Before Save as Event needed

  • Thread starter Thread starter hotbero
  • Start date Start date
H

hotbero

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!!!
 
Try this

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
If SaveAsUI Then Cancel = True
End Sub
 
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)
 
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!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top