Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Auto duplicating a sheet

I have just completed working on a sheet and now need to make copies of it. I
know I can right click on the sheet tab and select copy however I need 42
sheets. Is there a way to program XL to create 42 copies of the worksheet. I
am not real familuar with VBE but with help can work through it.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Auto duplicating a sheet

Hi

yes, this can be done via VBA, however, if you'ld like to let us know how
you would like your 42 sheets named we can incorporate this in the code.

Cheers
JulieD


"dvonj" wrote:

I have just completed working on a sheet and now need to make copies of it. I
know I can right click on the sheet tab and select copy however I need 42
sheets. Is there a way to program XL to create 42 copies of the worksheet. I
am not real familuar with VBE but with help can work through it.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Auto duplicating a sheet

Hi

okay modifying Jim's code - to give sheet names as well
Public Sub Duplicate()
Dim wks As Worksheet
Dim intCounter As Integer

j = DateValue("26/8/05")
Set wks = ActiveSheet
For intCounter = 1 To 42
wks.Copy , wks
j = j + 7
k = j + 7
ActiveSheet.Name = Format(j, "mmm dd") & " - " & Format(k, "mmm dd")
Next intCounter
End Sub

----
to use the code, right mouse click on the sheet tab - choose view code,
choose insert / module from the menu & copy & paste the code to the right
hand side of the screen. Switch back to your workbook and choose Tools /
Macro / Macros - Duplicate and press the RUN button.
(Please try this on a copy of your workbook first)

Regards
JulieD

"dvonj" wrote:

That can be a bit confusing but I'll try to explain. I have been naming the
sheets to represent the drivers work week which starts on Thurs and ends the
following Wed. So for example Mar 3 - Mar 9 would be one sheet then Mar 10 -
Mar 16 would be the next and so on. Our weeks are based on the school
calendar week starting with the first day of school Sep 2 - Sep 8.
Hope this makes sence.

"JulieD" wrote:

Hi

yes, this can be done via VBA, however, if you'ld like to let us know how
you would like your 42 sheets named we can incorporate this in the code.

Cheers
JulieD


"dvonj" wrote:

I have just completed working on a sheet and now need to make copies of it. I
know I can right click on the sheet tab and select copy however I need 42
sheets. Is there a way to program XL to create 42 copies of the worksheet. I
am not real familuar with VBE but with help can work through it.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Auto duplicating a sheet

Ok JulieD and Jim that was awsome. Thanks for the help.

"JulieD" wrote:

Hi

okay modifying Jim's code - to give sheet names as well
Public Sub Duplicate()
Dim wks As Worksheet
Dim intCounter As Integer

j = DateValue("26/8/05")
Set wks = ActiveSheet
For intCounter = 1 To 42
wks.Copy , wks
j = j + 7
k = j + 7
ActiveSheet.Name = Format(j, "mmm dd") & " - " & Format(k, "mmm dd")
Next intCounter
End Sub

----
to use the code, right mouse click on the sheet tab - choose view code,
choose insert / module from the menu & copy & paste the code to the right
hand side of the screen. Switch back to your workbook and choose Tools /
Macro / Macros - Duplicate and press the RUN button.
(Please try this on a copy of your workbook first)

Regards
JulieD

"dvonj" wrote:

That can be a bit confusing but I'll try to explain. I have been naming the
sheets to represent the drivers work week which starts on Thurs and ends the
following Wed. So for example Mar 3 - Mar 9 would be one sheet then Mar 10 -
Mar 16 would be the next and so on. Our weeks are based on the school
calendar week starting with the first day of school Sep 2 - Sep 8.
Hope this makes sence.

"JulieD" wrote:

Hi

yes, this can be done via VBA, however, if you'ld like to let us know how
you would like your 42 sheets named we can incorporate this in the code.

Cheers
JulieD


"dvonj" wrote:

I have just completed working on a sheet and now need to make copies of it. I
know I can right click on the sheet tab and select copy however I need 42
sheets. Is there a way to program XL to create 42 copies of the worksheet. I
am not real familuar with VBE but with help can work through it.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Auto duplicating a sheet

you're welcome

"dvonj" wrote in message
...
Ok JulieD and Jim that was awsome. Thanks for the help.

"JulieD" wrote:

Hi

okay modifying Jim's code - to give sheet names as well
Public Sub Duplicate()
Dim wks As Worksheet
Dim intCounter As Integer

j = DateValue("26/8/05")
Set wks = ActiveSheet
For intCounter = 1 To 42
wks.Copy , wks
j = j + 7
k = j + 7
ActiveSheet.Name = Format(j, "mmm dd") & " - " & Format(k, "mmm
dd")
Next intCounter
End Sub

----
to use the code, right mouse click on the sheet tab - choose view code,
choose insert / module from the menu & copy & paste the code to the right
hand side of the screen. Switch back to your workbook and choose Tools /
Macro / Macros - Duplicate and press the RUN button.
(Please try this on a copy of your workbook first)

Regards
JulieD

"dvonj" wrote:

That can be a bit confusing but I'll try to explain. I have been naming
the
sheets to represent the drivers work week which starts on Thurs and
ends the
following Wed. So for example Mar 3 - Mar 9 would be one sheet then Mar
10 -
Mar 16 would be the next and so on. Our weeks are based on the school
calendar week starting with the first day of school Sep 2 - Sep 8.
Hope this makes sence.

"JulieD" wrote:

Hi

yes, this can be done via VBA, however, if you'ld like to let us know
how
you would like your 42 sheets named we can incorporate this in the
code.

Cheers
JulieD


"dvonj" wrote:

I have just completed working on a sheet and now need to make
copies of it. I
know I can right click on the sheet tab and select copy however I
need 42
sheets. Is there a way to program XL to create 42 copies of the
worksheet. I
am not real familuar with VBE but with help can work through it.

Thanks



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
Duplicating Worksheet to 20 sheet workbook Steve Excel Discussion (Misc queries) 0 September 28th 06 11:17 PM
Auto duplicating a sheet dvonj Excel Programming 0 March 14th 05 06:38 PM
Auto duplicating a sheet Jim Thomlinson[_3_] Excel Programming 0 March 14th 05 06:37 PM
Auto Duplicating Worksheets and Insterting Data from Different Worksheet doc_in_bc Excel Programming 4 April 26th 04 02:37 AM
Duplicating data from sheet 1 to 2,3,4 etc Dave B[_8_] Excel Programming 1 January 18th 04 12:34 AM


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