Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default VBA code to create "variable" worksheets within a workbook

I have a need for a user to be able to create a new worksheet that
essentially is the combination of two or more sheets already contained within
the workbook.

For instance, I have 100 sheets within a workbook (all formatting, columns,
rows are identical, but the data contained within is unique)...I want to be
able to create a user interface using VBA that allows a user to be able to
pick and choose any number of the 100 sheets available, hit the OK button and
VBA creates a new worksheet that adds up the data within the selected sheets.
The new worksheet would be a template of sorts and the code behind it would
just add various cells together and populate this new sheet.

Any thoughts or suggestions?
Thanks,
Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default VBA code to create "variable" worksheets within a workbook

Does this mean you'll be adding cell D92 of all those selected worksheets?

If yes, how about an alternative?

Create three worksheets.
1. Name it summary (and make it the far left worksheet)
2. Name it Start (and put it anywhere)
3. Name it End (and put it to the right of Start)

On the summary worksheet:
Fill up with formulas like:
=sum(start:end!a1)

Now all the user has to do is drag the worksheets they want in between Start and
End (or move Start and End).

========
If your cells to add vary depending on worksheets, then you'll have to provide
some more info.

Chris wrote:

I have a need for a user to be able to create a new worksheet that
essentially is the combination of two or more sheets already contained within
the workbook.

For instance, I have 100 sheets within a workbook (all formatting, columns,
rows are identical, but the data contained within is unique)...I want to be
able to create a user interface using VBA that allows a user to be able to
pick and choose any number of the 100 sheets available, hit the OK button and
VBA creates a new worksheet that adds up the data within the selected sheets.
The new worksheet would be a template of sorts and the code behind it would
just add various cells together and populate this new sheet.

Any thoughts or suggestions?
Thanks,
Chris


--

Dave Peterson
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
create a "variable array?" to report data Jeff Excel Discussion (Misc queries) 1 May 6th 08 08:44 PM
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
cannot use "Create List" and "Share Workbook" same time Devendra Excel Discussion (Misc queries) 0 October 26th 06 06:05 AM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM


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