LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Activating workbook with variable Name

Hi,

I'm using VB to open each file in a certain directory,
copy info from each into a file and then closing the
opened file before looping to the next file.

Everything works fine except that I cannot figure out the
correct syntax to reactivate (or get the focus on) each
file after copying from it. The variable name is MyFile
defined as:

MyFile = Dir("F:\common\budget\import\" & "*.xls")

I've tried:

Windows("myfile.xls").Activate
Windows("myfile").Activate
Myfile.Activate

etc. without any luck.

Help greatly appreciated


 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
pass variable from one workbook to another calebjill Excel Discussion (Misc queries) 2 January 28th 09 07:38 PM
Vlookup using a variable for the workbook name Phil Excel Discussion (Misc queries) 4 November 10th 08 09:30 PM
Can not set WorkBook variable jlclyde Excel Discussion (Misc queries) 5 March 6th 08 09:46 PM
Activating a worksheet through use of a variable Cads Excel Worksheet Functions 2 February 7th 06 10:45 AM
Activating a workbook help bmwmcrider Excel Programming 1 October 21st 03 01:48 PM


All times are GMT +1. The time now is 11:39 PM.

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

About Us

"It's about Microsoft Excel"