Thread: help on a macro
View Single Post
  #6   Report Post  
gls858
 
Posts: n/a
Default

CLR wrote:
If I understood you correctly........this function can be recorded into a
macro as well...........
This will copy Sheet3 of Book7 into Book2, assuming both are open.........

Sub GetSheet()
' Macro1 Macro
' Macro recorded 3/16/2005
Windows("Book7.xls").Activate
Sheets("Sheet3").Select
Sheets("Sheet3").Copy After:=Workbooks("Book2").Sheets(3)
End Sub


Vaya con Dios,
Chuck, CABGx3


snip<


Thanks CLR. I found that when I tried to record the sheet move
I got a message saying the book would be closed and the changes
would be lost. I only had the one sheet in the book so when I moved it
Excel would try to close the book. I added a sheet and was able to record
the move, but when I added those lines to the macro I got an Out of range
error. I'm sure it's something simple but I'm new at building macros.
Used Excel for a long time just never played with this part. My needs
were basic :-)

I'll give your suggestion a try tomorrow. It's Miller time. I'm outta
here.

gls858