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?
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.