View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default refering to filename in VB

But the filename cannot not change whilst the WB is open.

dim WB as workbook
set wb=activeworkbook

msgbox wb.name
wb.activate

NickHK

"BrownTing" wrote
in message ...

I used the following;

Dim BLABLA
BLABLA = ActiveWorkbook.Name 'records the file name if it every
changed.
MsgBox "sdfsags " & BLABLA
Workbooks(BLABLA).Activate

I have a problem with putting a variable as the particular workbook
name.
I'm just wondering if this is the right syntax.

Workbooks(BLABLA).Activate


--
BrownTing
------------------------------------------------------------------------
BrownTing's Profile:

http://www.excelforum.com/member.php...o&userid=34919
View this thread: http://www.excelforum.com/showthread...hreadid=562913