export data from excel using VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have set up a button on excel so that when pressed it opens another
application and performs some actions to obtain some data. I used VBA record
to copy my actions in the other application and used preset figures to use
for inputting. However, I now need to know how to instead use figures I will
be inputting in cells in excel. any help would be greatly appreciated.

thanks
 
You can modify your code to get value from cells like this

Dim MyVar as Variant
MyVar = WorkBooks("Bob.xls").Worksheets("Inputs").Range("A1").Value

then in other code where you have hard coded values, you can replace them
with MyVar (as an example).
 
thanks Tom

Tom Ogilvy said:
You can modify your code to get value from cells like this

Dim MyVar as Variant
MyVar = WorkBooks("Bob.xls").Worksheets("Inputs").Range("A1").Value

then in other code where you have hard coded values, you can replace them
with MyVar (as an example).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top