Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Dialog sheet / Checkboxes

Hi All,

I have built a spreadsheet which uses VBA to present the user with a list of
choices by creating a dialog sheet "on the fly". The user checks the
checkbox to turn it on

The list can be up to approx 100 items in length. The problem that l am
having is that after 36 iterations the VBA code stops. Each iteration copies
an existing worksheet, places it in the workbook before a sheet named "end"
then renames it according the the name on the dialog sheet.

I am wondering if there are any limitations in Excel re the number of times
you can continually copy a worksheet, or there is a limit to the number of
worksheets in a workbook, or there is a limit to the number of checkboxes on
a dialog sheet or indeed anything else.

If exit from break mode where the code stops l am unable to manually copy
any sheet and Excel appears to be doing something but nothing happens, Excel
just returns to normal.

I have tried the code with Excel97 & Excel2000 under various OS and the
result is always the same

All suggestions greatly received

Regards

Michael Beckinsale


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dialog sheet / Checkboxes

Rob Bovey has previously posted that the problem appears to be the number of
copy actions rather than the number of sheets. His suggested work around
was to copy several sheets at once. So perhaps you could copy all the
selected sheets at once, then loop through them and do the renaming.

--
Regards,
Tom Ogilvy

"Michael Beckinsale" wrote in message
...
Hi All,

I have built a spreadsheet which uses VBA to present the user with a list

of
choices by creating a dialog sheet "on the fly". The user checks the
checkbox to turn it on

The list can be up to approx 100 items in length. The problem that l am
having is that after 36 iterations the VBA code stops. Each iteration

copies
an existing worksheet, places it in the workbook before a sheet named

"end"
then renames it according the the name on the dialog sheet.

I am wondering if there are any limitations in Excel re the number of

times
you can continually copy a worksheet, or there is a limit to the number of
worksheets in a workbook, or there is a limit to the number of checkboxes

on
a dialog sheet or indeed anything else.

If exit from break mode where the code stops l am unable to manually copy
any sheet and Excel appears to be doing something but nothing happens,

Excel
just returns to normal.

I have tried the code with Excel97 & Excel2000 under various OS and the
result is always the same

All suggestions greatly received

Regards

Michael Beckinsale




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Dialog sheet / Checkboxes

See this KB

Copying Worksheet Programmatically Causes Run-Time Error 1004
http://support.microsoft.com/default...84&Product=xlw

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Tom Ogilvy" wrote in message ...
Rob Bovey has previously posted that the problem appears to be the number of
copy actions rather than the number of sheets. His suggested work around
was to copy several sheets at once. So perhaps you could copy all the
selected sheets at once, then loop through them and do the renaming.

--
Regards,
Tom Ogilvy

"Michael Beckinsale" wrote in message
...
Hi All,

I have built a spreadsheet which uses VBA to present the user with a list

of
choices by creating a dialog sheet "on the fly". The user checks the
checkbox to turn it on

The list can be up to approx 100 items in length. The problem that l am
having is that after 36 iterations the VBA code stops. Each iteration

copies
an existing worksheet, places it in the workbook before a sheet named

"end"
then renames it according the the name on the dialog sheet.

I am wondering if there are any limitations in Excel re the number of

times
you can continually copy a worksheet, or there is a limit to the number of
worksheets in a workbook, or there is a limit to the number of checkboxes

on
a dialog sheet or indeed anything else.

If exit from break mode where the code stops l am unable to manually copy
any sheet and Excel appears to be doing something but nothing happens,

Excel
just returns to normal.

I have tried the code with Excel97 & Excel2000 under various OS and the
result is always the same

All suggestions greatly received

Regards

Michael Beckinsale






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Dialog sheet / Checkboxes

Tom / Ron

Many thanks for the quick response. Looking @ the information you pointed me
in the direction of has enabled me to use a workaround. Not the most elegant
of solutions but it works !

Good old Microsoft, "known error", could not see any info about it being
fixed in later versions of Excel

Regards
"Michael Beckinsale" wrote in message
...
Hi All,

I have built a spreadsheet which uses VBA to present the user with a list

of
choices by creating a dialog sheet "on the fly". The user checks the
checkbox to turn it on

The list can be up to approx 100 items in length. The problem that l am
having is that after 36 iterations the VBA code stops. Each iteration

copies
an existing worksheet, places it in the workbook before a sheet named

"end"
then renames it according the the name on the dialog sheet.

I am wondering if there are any limitations in Excel re the number of

times
you can continually copy a worksheet, or there is a limit to the number of
worksheets in a workbook, or there is a limit to the number of checkboxes

on
a dialog sheet or indeed anything else.

If exit from break mode where the code stops l am unable to manually copy
any sheet and Excel appears to be doing something but nothing happens,

Excel
just returns to normal.

I have tried the code with Excel97 & Excel2000 under various OS and the
result is always the same

All suggestions greatly received

Regards

Michael Beckinsale




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
How to add either radio buttons or checkboxes to an excel sheet? Cruanomics Excel Worksheet Functions 1 March 16th 07 04:31 PM
Copy checkboxes to another sheet Trese Excel Discussion (Misc queries) 2 August 4th 05 01:17 PM
Pre-checking checkboxes in a dialog box Mike[_65_] Excel Programming 8 January 9th 04 09:18 PM
Dialog Sheet not updating Macroman Excel Programming 0 November 27th 03 09:13 PM
Custom dialog box on protected sheet Paul Martin Excel Programming 2 November 6th 03 11:22 PM


All times are GMT +1. The time now is 07:15 PM.

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"