Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Before Save as Event needed

Hi!

-I have a Workbook.
-This Workbook, Workbook_Open() --- reads the Computer
Get_Drive_Serial & DiskVolumeId, to Check if the computer belogs to
Our Company.
-If Yes Unhides and Unprotects some of the Sheets "Hidden & Protected
with Workbook_BeforeSave Macro Event.


-When a new Computer open this file, there are no visible Sheets, the
Workbook_Open Reads the desired variables and if the workbook does not
have then in a database, always protected and hidden with:
Sheets("XXX").Visible = xlSheetVeryHidden
Request for a Password.
If the Password is OK, adds a New computer's DiskVolumeId... to Our
Database.



Everything worked Fine, but When I press Save As stead of Save,
EveryThing goes to the Rubbish!

Because there is not: Private Sub Workbook_BeforeSave """AS"""(ByVal
SaveAsUI As Boolean, Cancel As Boolean)


Any Help????
Many Thanks, for previous questions replies!!!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Before Save as Event needed

Try this

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
If SaveAsUI Then Cancel = True
End Sub


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


wrote in message om...
Hi!

-I have a Workbook.
-This Workbook, Workbook_Open() --- reads the Computer
Get_Drive_Serial & DiskVolumeId, to Check if the computer belogs to
Our Company.
-If Yes Unhides and Unprotects some of the Sheets "Hidden & Protected
with Workbook_BeforeSave Macro Event.


-When a new Computer open this file, there are no visible Sheets, the
Workbook_Open Reads the desired variables and if the workbook does not
have then in a database, always protected and hidden with:
Sheets("XXX").Visible = xlSheetVeryHidden
Request for a Password.
If the Password is OK, adds a New computer's DiskVolumeId... to Our
Database.



Everything worked Fine, but When I press Save As stead of Save,
EveryThing goes to the Rubbish!

Because there is not: Private Sub Workbook_BeforeSave """AS"""(ByVal
SaveAsUI As Boolean, Cancel As Boolean)


Any Help????
Many Thanks, for previous questions replies!!!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Before Save as Event needed

What does everything goes to Rubbish mean exactly?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
om...
Hi!

-I have a Workbook.
-This Workbook, Workbook_Open() --- reads the Computer
Get_Drive_Serial & DiskVolumeId, to Check if the computer belogs to
Our Company.
-If Yes Unhides and Unprotects some of the Sheets "Hidden & Protected
with Workbook_BeforeSave Macro Event.


-When a new Computer open this file, there are no visible Sheets, the
Workbook_Open Reads the desired variables and if the workbook does not
have then in a database, always protected and hidden with:
Sheets("XXX").Visible = xlSheetVeryHidden
Request for a Password.
If the Password is OK, adds a New computer's DiskVolumeId... to Our
Database.



Everything worked Fine, but When I press Save As stead of Save,
EveryThing goes to the Rubbish!

Because there is not: Private Sub Workbook_BeforeSave """AS"""(ByVal
SaveAsUI As Boolean, Cancel As Boolean)


Any Help????
Many Thanks, for previous questions replies!!!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Before Save as Event needed



Hi, and Many thanks!!!


Ron, Works fine!! Thanks, for Previous Replies, "some of then your as
well"

Hi Bob!
Rubbish= "everyhting goes bad"
Just my way to use English, "Not my language, Sorry!!"


Now Everything goes Fine Again!!
Just 25 min ago, NO!!

AGAIN MANY THANKS!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Event Macros Help Needed edo Excel Discussion (Misc queries) 6 February 26th 09 09:55 PM
Event Macro help needed Mike H Excel Discussion (Misc queries) 0 February 26th 09 09:04 PM
Event Macro help needed edo Excel Discussion (Misc queries) 0 February 26th 09 08:53 PM
formula needed to track dates event happened ilmeaz Excel Worksheet Functions 1 November 15th 05 02:52 AM
Prevent Change in Event when not needed JK Excel Programming 0 October 13th 03 08:10 PM


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