LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default auto copying Excel spreadsheets

Hi all

i think this is a glitch or maybe its a clipboard error i dont know but i
have a macro that creates worksheets based on a worksheet already in the pack
but when it reaches 24 copies created it stops and throws up an error. i
tried to create one manually but it does not allow me to create a new one
then. i close down the pack and re open it and the macro runs again with
another 24 sheets. am i missing something?

heres the macro


Sub updatevalues()
Dim sel, i, sheetnu As Integer
Dim check As Boolean

check = False
sel = Sheets("content").Range("a2")
sheetnu = 15
i = 3

Do Until check = True
If sel = 0 Then
check = True
Else
Sheets("2").Copy Befo=Sheets(sheetnu)
sheetnu = sheetnu + 1
ActiveSheet.Name = i
ActiveSheet.Range("B4") = i
ActiveSheet.Calculate
i = i + 1
sel = sel - 1
End If
Loop

End Sub

thank you


 
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
Auto updating muiltiple spreadsheets in Excel 2007 iBob Excel Worksheet Functions 1 May 17th 10 10:23 PM
Auto Calculate Not Working in some Spreadsheets - Excel 2003 tmpotvin Excel Worksheet Functions 2 October 22nd 09 10:19 PM
copying excel spreadsheets Lisa Excel Discussion (Misc queries) 2 December 31st 06 01:56 AM
How offten do Excel spreadsheets auto save? K Christopher New Users to Excel 2 March 8th 06 03:14 PM
How to auto save Excel spreadsheets Cheri Excel Discussion (Misc queries) 1 January 28th 05 08:47 PM


All times are GMT +1. The time now is 08:33 AM.

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"