Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Entry?

Status
Not open for further replies.

Guvnor

Technical User
Mar 26, 2002
12
GB
Say if you have got a form where you enter data for the Following deatils: Name , Age and address, how can you transfer this data to another sheet using a macro in excel?What coding is needed?

Thanks alot for your help
 
If the data on the form is in a Visualbasic application, an reference of excel must inserted in the application.
Then you must call the prcedure Applicaion.Run of your excelinstance.

dim lvo_Excel as new Excel.Application
call lvo_Excel.run(StartNewWindow, Name.text, Adress.text, Age.text)

In the makro, you have to open the new form. The best way to do this ist to open the form by a procedure written by yourself, where you can give the data as parameters.

public Sub StartNewWindow(Name as string, Adress as String, Age as string)

call NewForm.ShowMe(Name, Adress, Age)
end sub

Public Sub SowMe(Name as string, Adress as string, Age as string)

Name.text=Name
Adress.text=Adress
Age.text=age
NewForm.Show
end sub


cu Kostarsus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top