Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default prevent button from copying

Using XL2K, I have a "New Month" button on the Worksheet Menu Bar that,
when clicked, runs a routine that, among other things, copies all sheets to
a new workbook. Problem is, that button duplicates (others don't, only this
clicked one). It stays there until I deactivate to book through various
means (opening/closing new workbook, closing/reopening the file), when its
Workbook_Activate routine deletes it. I've spent several hours searching
the archives for a solution with no luck.

Any help?

--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default prevent button from copying

David wrote

Using XL2K, I have a "New Month" button on the Worksheet Menu Bar
that, when clicked, runs a routine that, among other things, copies
all sheets to a new workbook. Problem is, that button duplicates
(others don't, only this clicked one). It stays there until I
deactivate to book through various means (opening/closing new
workbook, closing/reopening the file), when its Workbook_Activate
routine deletes it. I've spent several hours searching the archives
for a solution with no luck.

Any help?


Never mind.
Found some code using Application.OnTime Now that handled it.
It was a bit cumbersome to watch and wait for the original code to finish,
though, before deleting the extra button.
For MY purposes, since I'm copying all sheets to a new workbook, adding
Application.EnableEvents=False early in the routine eliminated the need for
Application.OnTime Now, and my eyes didn't have to endure as much.

--
David
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
prevent copying tofimoon3 New Users to Excel 2 January 18th 09 05:54 AM
Prevent formats from copying Weirdism Excel Discussion (Misc queries) 1 June 22nd 05 12:35 PM
Prevent copying sheet PAM Excel Programming 2 July 8th 04 08:54 PM
Prevent File Copying Bufo Calvin Excel Programming 1 May 25th 04 07:51 PM
How to prevent copying in Excel Andrew Ussery Excel Programming 0 April 28th 04 05:07 PM


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

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"