#1   Report Post  
Jeff
 
Posts: n/a
Default Workbook.activate

Hi,
This is my VBA Macro:
fname = Application.GetOpenFilename
Workbooks.Open filename:=fname
'
'
Windows("Fichier Exemple.xls").Activate
Sheets("Fichier Exemple").Activate
How do I re-activate fname ?
Thanks,


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

fname = Application.GetOpenFilename
Set wb = Workbooks.Open( filename:=fname)
'
'
Windows("Fichier Exemple.xls").Activate
Sheets("Fichier Exemple").Activate
wb.activate

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jeff" wrote in message
...
Hi,
This is my VBA Macro:
fname = Application.GetOpenFilename
Workbooks.Open filename:=fname
'
'
Windows("Fichier Exemple.xls").Activate
Sheets("Fichier Exemple").Activate
How do I re-activate fname ?
Thanks,




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"