Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Set a cell from another worksheet
This should be VERY simple. I'm trying to code VBA for the first time, and I
get a syntax error on the below statement. From all the tutorials I read, this should work. any clue? Range(a99) ='[Book1.xls]Sheet1'!$B$1 |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Set a cell from another worksheet
Hi Greg
You need a little more code to make it work, and double qutation signs. Have a look at this: With Workbooks("Book1.xls") MyValue = .Sheets(1).Range("B1").Value End With Range("A99") = MyValue Regards, Per "Greg" skrev i meddelelsen ... This should be VERY simple. I'm trying to code VBA for the first time, and I get a syntax error on the below statement. From all the tutorials I read, this should work. any clue? Range(a99) ='[Book1.xls]Sheet1'!$B$1 |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Set a cell from another worksheet
Wow, that's a far cry from seeing some tutorials that say to do it like this:
='C:\My Documents\Worksheets\[Book1.xls]Shhet1'!$B1 but it worked!! Thank you!! "Per Jessen" wrote: Hi Greg You need a little more code to make it work, and double qutation signs. Have a look at this: With Workbooks("Book1.xls") MyValue = .Sheets(1).Range("B1").Value End With Range("A99") = MyValue Regards, Per "Greg" skrev i meddelelsen ... This should be VERY simple. I'm trying to code VBA for the first time, and I get a syntax error on the below statement. From all the tutorials I read, this should work. any clue? Range(a99) ='[Book1.xls]Sheet1'!$B$1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to name worksheet tabs using a cell within the worksheet? | Excel Discussion (Misc queries) | |||
Can I click on a cell on one worksheet and make it take me to another worksheet | New Users to Excel | |||
How do I copy a date in a worksheet cell to another worksheet? | Excel Worksheet Functions | |||
How can I link cell colours from worksheet to worksheet/workbook? | Excel Worksheet Functions | |||
Worksheet reference (i.e placing worksheet name in a cell) | Excel Worksheet Functions |