Thread: VBA syntax
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default VBA syntax

ActiveWorkbook.Sheets("Sales").Cells(5, 1)

it has to be of the form
workbook.worksheet.range

"dhstein" wrote:

I have some code in a macro that was recorded like this:
TableDestination:="[MyWorkbook.xlsm]Sales!R5C1"

I would like to replace Myworkbook.xlsm with "ActiveWorkbook

Is this the syntax:

TableDestination:="[ActiveWorkbook]Reorder!R5C1" ?

OR

TableDestination:="ActiveWorkbook.Reorder!R5C1"

OR something else?

Thanks for any help on this