Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dunescratcher
 
Posts: n/a
Default cell value as a filename


Hi all,


An earlier thread(help required with using cells to generate a
filename) nearly helped but not quite.

I want to use a cell value as a filename with the workbook to be saved
in a specific folder but I want the Dialog box to open first with the
filename in it so the user has to actually click on Save As.

So far, so bad: what I have got doesn’t work at all and I’d
be very grateful for any help at all

Many thanks in advance,

DS


--
dunescratcher
------------------------------------------------------------------------
dunescratcher's Profile: http://www.excelforum.com/member.php...o&userid=33114
View this thread: http://www.excelforum.com/showthread...hreadid=529322

  #2   Report Post  
Posted to microsoft.public.excel.misc
Nick Hodge
 
Posts: n/a
Default cell value as a filename

Not sure I understand you, but if you are trying to force a 'save as...'
opposed to a save then you can use the workbook_save() event

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If SaveAsUI Then
'do what you want here as user pressed Save as...
Exit Sub
End If
'cancel the save if user pressed save
Cancel = True
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"dunescratcher"
wrote in message
news:dunescratcher.25pc1c_1144090210.1796@excelfor um-nospam.com...

Hi all,


An earlier thread(help required with using cells to generate a
filename) nearly helped but not quite.

I want to use a cell value as a filename with the workbook to be saved
in a specific folder but I want the Dialog box to open first with the
filename in it so the user has to actually click on Save As.

So far, so bad: what I have got doesn’t work at all and I’d
be very grateful for any help at all

Many thanks in advance,

DS


--
dunescratcher
------------------------------------------------------------------------
dunescratcher's Profile:
http://www.excelforum.com/member.php...o&userid=33114
View this thread: http://www.excelforum.com/showthread...hreadid=529322



  #3   Report Post  
Posted to microsoft.public.excel.misc
dunescratcher
 
Posts: n/a
Default cell value as a filename


Nick!

Thanks for the quick reply. I have already got:

Sub SaveAs1()
'
' SaveAs1 Macro
' Macro recorded 03/04/2006 by GB
'
' Keyboard Shortcut: Ctrl+e
'
ActiveWorkbook.SaveAs "C:\Windows\All users\desktop\" & Range("E2")
& ".xls"

End Sub

...which directly saves the workbook under the name in "E2". I am
trying to still generate the same file name but want to force a Save As
with the name coming up in dialog box and the destination file also.
User to click on Save As to complete.

Thanks for your input so far,
DS


--
dunescratcher
------------------------------------------------------------------------
dunescratcher's Profile: http://www.excelforum.com/member.php...o&userid=33114
View this thread: http://www.excelforum.com/showthread...hreadid=529322

  #4   Report Post  
Posted to microsoft.public.excel.misc
dunescratcher
 
Posts: n/a
Default cell value as a filename


Nick!

Thanks for the quick reply. I have already got:

Sub SaveAs1()
'
' SaveAs1 Macro
' Macro recorded 03/04/2006 by GB
'
' Keyboard Shortcut: Ctrl+e
'
ActiveWorkbook.SaveAs "C:\Windows\All users\desktop\" & Range("E2")
& ".xls"

End Sub

...which directly saves the workbook under the name in "E2". I am
trying to still generate the same file name but want to force a Save As
with the name coming up in dialog box and the destination file also.
User to click on Save As to complete.

Thanks for your input so far,
DS


--
dunescratcher
------------------------------------------------------------------------
dunescratcher's Profile: http://www.excelforum.com/member.php...o&userid=33114
View this thread: http://www.excelforum.com/showthread...hreadid=529322

  #5   Report Post  
Posted to microsoft.public.excel.misc
dunescratcher
 
Posts: n/a
Default cell value as a filename


Hi,

Thanks again. It wasn't exactly what I was after bit it set me on the
right track:

What I wanted to do was this:

Application.Dialogs(xlDialogSaveAs).Show "C:\Windows\All users\bureau\"
& Range("E2") & ".xls"

which works fine. Am already working on another stupîd question....

Thanks again,

DS


--
dunescratcher
------------------------------------------------------------------------
dunescratcher's Profile: http://www.excelforum.com/member.php...o&userid=33114
View this thread: http://www.excelforum.com/showthread...hreadid=529322

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
how to use a cell to enter a filename in a formula John Excel Worksheet Functions 2 March 11th 06 09:26 PM
substitute the filename in a cell reference with a string in another cell. flummi Excel Discussion (Misc queries) 11 February 22nd 06 01:14 PM
cell filename Carina Excel Discussion (Misc queries) 1 November 3rd 05 01:37 PM
How do I use a cell value as the filename in an external link? wattkisson Excel Worksheet Functions 1 July 8th 05 11:51 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


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