#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tuukka
 
Posts: n/a
Default workbook name

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default workbook name

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

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Tuukka" wrote in message
...
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.



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
excel exits unexpectedly or hangs the second time I open workbook r_m_i Excel Discussion (Misc queries) 0 February 9th 06 10:14 PM
Repost:Automatically inserting a row in external workbook 50pingviner Excel Discussion (Misc queries) 3 December 28th 05 07:38 PM
keeping a toolbar attached to a workbook Paul Ponzelli Excel Discussion (Misc queries) 0 August 12th 05 11:39 PM
Find a value in a workbook and return the worksheet name Craig Excel Discussion (Misc queries) 2 August 10th 05 09:47 PM
How to hyperlink from a workbook to sheets in another workbook? MJOHNSON Excel Worksheet Functions 0 February 17th 05 08:31 PM


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