Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy from worksheet to worksheet with Macro

Hi All,
I don't program macros in Excell often, but would like to automate a
monthly spreadsheet. I would like to copy the headers from the
January worksheet to the current month and format. I can get it to do
the formating, but what syntax is necessary to copy A!-E1 in the
January 22,2003 sheet to one for September, October etc (assuming that
I am in the current month's sheet). Many thanks in advance.. Best,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Copy from worksheet to worksheet with Macro

Easiest way is to select the sheets you want by ctrl+sheet keytype in the
headersselect only one sheetdone

"Robert L. Altic Jr." wrote in message
...
Hi All,
I don't program macros in Excell often, but would like to automate a
monthly spreadsheet. I would like to copy the headers from the
January worksheet to the current month and format. I can get it to do
the formating, but what syntax is necessary to copy A!-E1 in the
January 22,2003 sheet to one for September, October etc (assuming that
I am in the current month's sheet). Many thanks in advance.. Best,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy from worksheet to worksheet with Macro

worksheets("January 22,2003").Range("A1:E1").Copy _
Destination:=ActiveSheet.Range("A1:E1")

Check the name of the January sheet - should there be a space after the
comma?

--
Regards,
Tom Ogilvy

"Robert L. Altic Jr." wrote in message
...
Hi All,
I don't program macros in Excell often, but would like to automate a
monthly spreadsheet. I would like to copy the headers from the
January worksheet to the current month and format. I can get it to do
the formating, but what syntax is necessary to copy A!-E1 in the
January 22,2003 sheet to one for September, October etc (assuming that
I am in the current month's sheet). Many thanks in advance.. Best,



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy from worksheet to worksheet with Macro

On Fri, 12 Sep 2003 11:39:48 -0400, "Tom Ogilvy"
wrote:

worksheets("January 22,2003").Range("A1:E1").Copy _
Destination:=ActiveSheet.Range("A1:E1")

Check the name of the January sheet - should there be a space after the
comma?

--
Regards,
Tom Ogilvy

"Robert L. Altic Jr." wrote in message
.. .
Hi All,
I don't program macros in Excell often, but would like to automate a
monthly spreadsheet. I would like to copy the headers from the
January worksheet to the current month and format. I can get it to do
the formating, but what syntax is necessary to copy A!-E1 in the
January 22,2003 sheet to one for September, October etc (assuming that
I am in the current month's sheet). Many thanks in advance.. Best,



Hi Tom,
Did your suggestion changing the date on the first tab and get a
subscript out of range message. Suggestions?

copy of macro:

Sub test()
'
' test Macro
' Macro recorded 6/14/2003 by Robert L. Altic Jr.
'

'
Worksheets("January 22, 2003").Range("A1:E1").Copy _
Destination:=ActiveSheet.Range("A1:E1")
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy from worksheet to worksheet with Macro

You get that error message if "January 22,2003". does not match the name
on the worksheet tab.

ONLY you can check that.

In otherwords, Mike doesn't answer to the name Bob. As an example.

--
Regards,
Tom Ogilvy

"Robert L. Altic Jr." wrote in message
...
On Fri, 12 Sep 2003 11:39:48 -0400, "Tom Ogilvy"
wrote:

worksheets("January 22,2003").Range("A1:E1").Copy _
Destination:=ActiveSheet.Range("A1:E1")

Check the name of the January sheet - should there be a space after the
comma?

--
Regards,
Tom Ogilvy

"Robert L. Altic Jr." wrote in message
.. .
Hi All,
I don't program macros in Excell often, but would like to automate a
monthly spreadsheet. I would like to copy the headers from the
January worksheet to the current month and format. I can get it to do
the formating, but what syntax is necessary to copy A!-E1 in the
January 22,2003 sheet to one for September, October etc (assuming that
I am in the current month's sheet). Many thanks in advance.. Best,



Hi Tom,
Did your suggestion changing the date on the first tab and get a
subscript out of range message. Suggestions?

copy of macro:

Sub test()
'
' test Macro
' Macro recorded 6/14/2003 by Robert L. Altic Jr.
'

'
Worksheets("January 22, 2003").Range("A1:E1").Copy _
Destination:=ActiveSheet.Range("A1:E1")
End Sub





Reply
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
Copy Macro with Worksheet Kersten Excel Discussion (Misc queries) 4 April 3rd 09 05:36 PM
Macro Copy Worksheet Name into worksheet A1 bmac Excel Worksheet Functions 3 October 4th 07 07:51 PM
VB Macro to Copy from Worksheet KCG Excel Discussion (Misc queries) 1 September 2nd 07 08:46 AM
macro to copy worksheet vitorjose Excel Worksheet Functions 0 January 25th 07 01:01 AM
I need help with a macro which will copy a worksheet and.. Greegan Excel Worksheet Functions 2 July 29th 05 11:48 PM


All times are GMT +1. The time now is 10:55 AM.

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"