Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Ignore Missing Worksheets

Hello - I've created a workbook that functions as a purchase order. It allows
a user to select anywhere from 1 to 12 styles for their purchase order - the
macro creates that number of worksheets based on what the user selects.

The worksheets created have no formulas in them. I have a "master" sheet
that does contain the formulas but to put formulas in each of the sheets as
they're created would take too long to calculate.

Is there a way to create a macro that basically says "If Style 1 exists,
paste the formulas from the Master worksheet. If Style 2 exists, paste the
formulas from the Master worksheet. - etc... I tried creating a macro that
pastes the formulas for the maximum number of styles (12), but I get errors
when the worksheet doesn't exist (of course).

Thank you for whatever help you can give me.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Ignore Missing Worksheets

Hiya,

Use Error handling to skip over where your sheets don't exist.
On Error Resume Next switches the error handling off
On Error Goto 0 switches it back on

----------------------------------------------------
Sub HandleSheets()

On Error Resume Next
Sheets("NotThere").Select
On Error GoTo 0

End Sub
------------------------------------------------------
http://www.excel-ant.co.uk

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
Find missing numbers in list, ignore duplicates Galceran Excel Discussion (Misc queries) 0 October 30th 07 05:05 PM
Compare two worksheets for missing information Naba via OfficeKB.com Excel Worksheet Functions 6 July 7th 06 05:46 PM
ignore missing values while ploting graph Excel plot Excel Discussion (Misc queries) 2 September 15th 05 06:48 PM
On Error? Creates 1 missing worksheet then never detects any other missing worksheets Craigm[_35_] Excel Programming 2 August 1st 05 02:39 PM
how can i get the slope function to ignore missing data? Delmar Excel Discussion (Misc queries) 0 December 2nd 04 05:55 PM


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