Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi there excel peeps, Hope you all are well. I've got a bit of a problem, no one I know can help, and I can't find the A team!!!! PLEASE. Can anyone give me the Visual Basic Code to open up a 'save as' dialog box, with the filename as 'dd/mm/yy_sportsreturn', (dd/mm/yy being the save date or a cell reference to a date), but give the user the ability to save the file where they want to? I've had a few goes, but i'm new to VBA and I can get the file to save as a date formatted filename but I can't just get the box to open with the correct filename, filetype(excel), and let the user put it where he wants. It's getting a bit frustrating. If i'm asking too much from excel/VBA can someone just give me a nudge, i'll shut up and go do an ECDL course or something :) Many Thanks in advance Gaz -- Cobbcouk ------------------------------------------------------------------------ Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143 View this thread: http://www.excelforum.com/showthread...hreadid=528247 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() PS ive had a look round the forums and can't find an answer!!!!! : -- Cobbcou ----------------------------------------------------------------------- Cobbcouk's Profile: http://www.excelforum.com/member.php...fo&userid=3214 View this thread: http://www.excelforum.com/showthread.php?threadid=52824 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cobbcouk,
You need to look at "GetSaveAsFilename". Dim FileName as string Dim RetVal As Variant FileName=Format(Now(), "dd/mm/yy") & "_sportsreturn.xls" str = Application.GetSaveAsFilename(FileName) 'make sure the user did not change the filename If str<FileName Then Msgbox "No, file must be called " & FileName Exit sub Else 'OK to save Thisworkbook.SaveAs FileName End If You need to handle the case when the clicks also. Hint: RetVal=False NickHK "Cobbcouk" wrote in message ... Hi there excel peeps, Hope you all are well. I've got a bit of a problem, no one I know can help, and I can't find the A team!!!! PLEASE. Can anyone give me the Visual Basic Code to open up a 'save as' dialog box, with the filename as 'dd/mm/yy_sportsreturn', (dd/mm/yy being the save date or a cell reference to a date), but give the user the ability to save the file where they want to? I've had a few goes, but i'm new to VBA and I can get the file to save as a date formatted filename but I can't just get the box to open with the correct filename, filetype(excel), and let the user put it where he wants. It's getting a bit frustrating. If i'm asking too much from excel/VBA can someone just give me a nudge, i'll shut up and go do an ECDL course or something :) Many Thanks in advance Gaz -- Cobbcouk ------------------------------------------------------------------------ Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143 View this thread: http://www.excelforum.com/showthread...hreadid=528247 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to save file as different filename | Excel Worksheet Functions | |||
Date + Filename using save copy as | Excel Programming | |||
Filename has Url in file-save dialog when saving exported Excel do | Excel Programming | |||
Save date in filename | Excel Programming | |||
Save Filename+Date+Time? | Excel Programming |