Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Disable macro if sheet exist

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Reid - 26 Oct 2007 01:22 GMT
hello all,

is it possible to disable a macro in excel if a sheet exist.

I have a macro that creates several sheets.  I would like to disable that
macro once the sheets are created.  Is that possible.  I am asking because I
mistakenly ran that macro again and it created more sheets.

Thanks in advance
Jim Cone - 26 Oct 2007 02:14 GMT
At the beginning of your current macro, something like ...
If Worksheets.Count < 6 then
  'create sheets
Else
   Exit Sub
End if
Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"Charles Reid"
wrote in message
hello all,

is it possible to disable a macro in excel if a sheet exist.
I have a macro that creates several sheets.  I would like to disable that
macro once the sheets are created.  Is that possible.  I am asking because I
mistakenly ran that macro again and it created more sheets.

Thanks in advance

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.