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: 175
Default Differences in the way a .xls file is opened

I have a macro that does something entirely different, depending on the way I
have opened the file containing the macro.

Method 1: Launch Excel, then click the open button and select the file.
Method 2: Open my documents folder and double click the *.xls file

I am trying to select and copy row1-28, then paste this group down multiple
times based on a # in a cell of the original sheet (the one with the macro).
The copy cells are in a different workbook, and the paste ranges are also in
that same "different workbook"

When Method 1 is used, The Active sheet remains to be the 1st workbook, even
though I have code that should select and activate the other sheet.

When Method 2 is used, The active sheet switches to the "different workbook"
just like the code says to do.

Code that swaps the active sheet to the "different workbook"...
Application.Workbooks("newblankwb.xls").Activate
Sheets("Logs").Activate

This code wont seem to work for open method 1.

Why does this happen?
Is there some code that will work the same irreguardless of the way the
sheet was opened?

--
Regards,
John
 
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
opening an excel file differences - time George Applegate[_2_] Excel Discussion (Misc queries) 0 May 1st 09 05:57 PM
Close file and run macro from newly opened file Pradip Jain Excel Programming 1 April 23rd 05 11:39 PM
Is Workbook read-only because of file permission or because file is already opened? balexis Excel Programming 0 September 29th 04 02:29 PM
How set file open path to filepath of file opened with Explorer ? RandyDtg1 Excel Programming 0 May 14th 04 02:05 AM
Opening CSV file causes date differences Tom Ogilvy Excel Programming 0 August 6th 03 12:26 AM


All times are GMT +1. The time now is 03:04 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"