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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA access to cell in another sheet of the same workbook

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,043
US
The title pretty much says it, I need to pass a value from another tab of the active workbook to a variable. When I use the code below, I get "Object Doesn't Support this Property or Method".

Code:
dtDate = ActiveWorkbook.Sheet4.Cells(1, 13).Value

Any insights on how to do this? I have google but cannot find this.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
 
Hi,

Code:
'
   ActiveSheet.Cells(dtDate).Value = ActiveWorkbook.Sheet4.Cells(1, 13).Value
This assumes that Sheet4 is the CodeName for the sheet and not simply the sheet name.
 
Target cell reference is incomplete. For the source: =ActiveWorkbook.Worksheets("Sheet4").Cells(1, 13).Value. (In case of referencing by code name, as in your post, instead of ActiveWorkbook you need vba project name, that should be changed to unique name first).

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top