View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Calling to a specific cell

if you want to get anything done in VBA you must
study cell and range referencing.

just asking for a quick answer here wont help.

ALL vba books i ever read contain many pages on the subject.
I woud have plenty of suggestions... except you need to understand
rather then copy it.

Which workbook are we talking about?
the currently active workbook =Activeworkbook
the workbook in which the code is running =Thisworkbook
or a specific workbook =Workbooks("vbaLesson1")

How do you want to refer to the sheets?
Use the currently activesheet =ActiveSheet
Use the first sheet in the workbook =Worksheets(1)
or a specific worksheet =Worksheets("sheet1")

etc

you're question is ambiguous.. so this is what i make of it:

if activesheet.name = "sheet2" then
activecell=[sheet1!a3]
else
msgbox "you're not on sheet2"
endif



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Kura" wrote:

I can't seem to find a way to place a cell's location in
a variable or how to call a cell from another sheet.
Basically I need a macro running on sheet 2 to call A3 on
sheet1 and report the value stored there. Any suggestions?