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 / Worksheet Functions / May 2006

Tip: Looking for answers? Try searching our database.

workbook name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tuukka - 18 May 2006 09:29 GMT
Hi,
is it possible to automatically name workbooks so that it gets its name from
ie. shell A1? Workbook is saved to prevent unwanted actions but still users
would need to name each workbook.
Bob Phillips - 18 May 2006 09:36 GMT
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
   If SaveAsUI Then
       Cancel = True
       ThisWorkbook.SaveAs = Worksheets("Sheet1").Range("A1").Value
   End If
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Signature

HTH

Bob Phillips

(remove xxx from email address if mailing direct)

> Hi,
> is it possible to automatically name workbooks so that it gets its name from
> ie. shell A1? Workbook is saved to prevent unwanted actions but still users
> would need to name each workbook.
 
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



©2009 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.