Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date Filename Save as Dialog Macro Thingy!!!!!!


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date Filename Save as Dialog Macro Thingy!!!!!!


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Date Filename Save as Dialog Macro Thingy!!!!!!

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
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
Macro to save file as different filename mac Excel Worksheet Functions 6 November 21st 07 10:43 PM
Date + Filename using save copy as SKelley Excel Programming 4 April 27th 05 09:30 PM
Filename has Url in file-save dialog when saving exported Excel do GJones Excel Programming 0 September 1st 04 08:17 PM
Save date in filename Mike Excel Programming 6 February 24th 04 02:12 PM
Save Filename+Date+Time? Scooby912 Excel Programming 1 July 25th 03 06:21 PM


All times are GMT +1. The time now is 03:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"