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: 17
Default moved macros to new book now they don't work

This is my third attempt to post this problem. My apologies for any
duplication.

I moved some macros to a new workbook (Excel 2003), so they could be shared
amongst multiple workbooks. In order to run the code in the new location, I
changed the worksheet_activate sub in the originating sheet as follows:

from Call Macro1("Parm1")
to Application.Run "'_Workbook2.xls'!Macro1(""Parm1"")"

Now some of the code doesn't work. For example:

With Worksheets("Sheet1")
.Columns("A:I").ClearContents ' does nothing
.Cells(10, 3) = "line 1" ' works
End With

Any suggestions would be 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
moved code to new book - some doesn't work now lallen Excel Programming 4 April 28th 10 02:30 AM
moved macros to new book, now not working lallen Excel Programming 1 April 27th 10 01:44 AM
Moved file, changed path, macros don't work donbowyer Excel Programming 3 May 22nd 06 08:27 AM
Maintaining a hyperlink to moved data within the work book Kev Nurse Excel Discussion (Misc queries) 1 January 28th 05 01:22 AM
Macros - get information from Multiple sheets in a work book? matt Excel Programming 1 November 22nd 04 02:53 PM


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