Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Set a cell from another worksheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg - 20 Mar 2008 19:55 GMT
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
Per Jessen - 20 Mar 2008 20:46 GMT
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

> This should be VERY simple.  I'm trying to code VBA for the first time,
> and I
[quoted text clipped - 3 lines]
>
> Range(a99) ='[Book1.xls]Sheet1'!$B$1
Greg - 20 Mar 2008 21:55 GMT
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!!

> Hi Greg
>
[quoted text clipped - 18 lines]
> >
> > Range(a99) ='[Book1.xls]Sheet1'!$B$1

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.