LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Annabelle
 
Posts: n/a
Default Macro broken with workbook name change

I've created a macro that allows the end user to roll-up individual
worksheets into a Master worksheet within the same workbook, executing
three other macros. This works great until the file name is changed
(reflecting the date of last change), then the receive the error below.
The working file name is Project Tracking Report - 060127.xls and all
of the macros are contained within this workbook becauses the three end
users access from a shared directory.

ASSISTANCE REQUEST
This problem occurs when the file name is changed. Is there a way to
update the code so it reflects the current workbook name?

ERROR:
Run-time error '1004':
Select method of Range class failed


MACRO
Sub MasterPTR2()
'
' MasterPTR2 Macro
' Macro recorded 1/30/2006 by B. Ann Bolland
'

'
Rows("5:800").Select
Selection.ClearContents
Range("A5").Select
Application.Run "'Project Tracking Report - 060127.xls'!Test4"
Application.Run "'Project Tracking Report -
060127.xls'!Master_Cleanup"
Application.CutCopyMode = False
Application.Run "'Project Tracking Report -
060127.xls'!Master_Cleanup2"
End Sub

 
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
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Event Macro adjustment needed - need to change font color also nick s Excel Worksheet Functions 2 November 28th 05 05:50 PM
macro to browse for workbook, pick up data and looping uriel78 Excel Worksheet Functions 1 March 10th 05 12:37 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Copying a workbook with custom toolbar assigned to a macro Matt W Excel Discussion (Misc queries) 1 February 4th 05 10:46 PM


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