View Single Post
  #3   Report Post  
WayneB
 
Posts: n/a
Default

Hi Dave: When I copy the sheet with macros from an old file to a a new file
and invoke it with a button it will spawn the old file. When I move the
sheet, it just says the macros don't exist. Here's the sample code...


Sub SortBDescending()
'
' JobSearchSortDate Macro
' Macro recorded 9/19/2004 by Wayne and Debi
'

'
Range("B2:I1000").Select
Selection.Sort Key1:=Range("B3"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
Range("B2").Select
End Sub




"David McRitchie" wrote in message
...
Hi Wayne,
How are you invoking the macros?
Alt+F8
Toolbar buttons
Menus
Shortcut keys

What does the file reference look like from where you invoke it.

Trying to understand why the macro is okay in one worksheet, but
not in the other. Do you have Event macros that are installed
with a worksheet. Does the following show a macro in the one of the
worksheets that works.
Right-click on worksheet tab, View code
--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"WayneB" wrote in message
...
Hi: I have a spreadsheet with macros that I'd like to copy to new
spreadsheets. But when I do the macros open the old file. I've tried
moving the spreadsheet to the new spreadsheets but then it says the
macros
don't exist. any ideas? wayne