LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Application.GetSaveAsFilename question

Why can't I get this to work? I'm trying to use GetSaveAsFilename to prompt
the user to save a file using a specific file naming protocol. Examples of
what the filename should look like:

GSO C&A PF Jul 09 wk1 bm
VHeathrow C&A PF Dec 09 wk5 lw
Austin C&A PF May 09 wk2 gh

I'm using IFN to set up what the filename should look like then trying to
set InitialFilename parameter equal to IFN but all I keep getting is "C&A PF
09 ". So basically it's picking up everything between ""'s and excluding the
variables. How do I get the variables in the assignment?
Private Sub PanicSwitch_Click()
Dim AUserFile As Variant
Dim FNwk As String
Dim FNmonth As String
Dim FNname As String
Dim IFN As String

Month7Select = Month7.Value
MonthRSelect = MonthR.Value
WeekSelect = Week.Value
NameSelect = AName.Value
CenterSelect = Center.Value
Cells(1, 25) = Month7Select
Cells(1, 1) = MonthRSelect
Cells(2, 1) = WeekSelect
Cells(1, 2) = NameSelect
Cells(2, 2) = CenterSelect
Unload NotSoFast

If MonthRSelect = "January" Then FNmonth = Jan
If MonthRSelect = "February" Then FNmonth = Feb
If MonthRSelect = "March" Then FNmonth = Mar
If MonthRSelect = "April" Then FNmonth = Apr
If MonthRSelect = "May" Then FNmonth = May
If MonthRSelect = "June" Then FNmonth = Jun
If MonthRSelect = "July" Then FNmonth = Jul
If MonthRSelect = "August" Then FNmonth = Aug
If MonthRSelect = "September" Then FNmonth = Sep
If MonthRSelect = "October" Then FNmonth = "Oct"
If MonthRSelect = "November" Then FNmonth = Nov
If MonthRSelect = "December" Then FNmonth = Dec
If WeekSelect = "Week 1" Then FNweek = wk1
If WeekSelect = "Week 2" Then FNweek = wk2
If WeekSelect = "Week 3" Then FNweek = wk3
If WeekSelect = "Week 4" Then FNweek = wk4
If WeekSelect = "Week 5" Then FNweek = wk5
If NameSelect = "Bishop Minter" Then FNname = bm
If NameSelect = "Carlos Trespalacios" Then FNname = ct
If NameSelect = "Dennis Murphy" Then FNname = dm
If NameSelect = "Gary Hayden" Then FNname = gh
If NameSelect = "Gloria Montoya" Then FNname = gm
If NameSelect = "Kenneth Accomando" Then FNname = ka
If NameSelect = "Lisa Muttillo" Then FNname = lm
If NameSelect = "Lorraine Warburton" Then FNname = lw
If NameSelect = "Warner Langlois" Then FNname = wl

IFN = CenterSelect & "C&A PF" & FNmonth & " 09 " & FNweek & " " & FNname

AUserFile = Application.GetSaveAsFilename(InitialFileName:=IFN ,
FileFilter:="Excel Workbooks(*.xls),*.xls", FilterIndex:=1, Title:="You Must
Save Before You Proceed")
End Sub
 
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
Application.GetSaveAsFilename problem Bishop Excel Programming 3 April 30th 09 08:56 PM
GetSaveAsFilename Question kev_06[_6_] Excel Programming 1 June 5th 06 09:07 PM
a question about "Application.GetSaveAsFileName" 12Keys Excel Programming 2 April 13th 06 06:25 AM
After GetSaveAsFileName question Stuart[_5_] Excel Programming 1 July 9th 04 09:29 PM
File save location with Application.GetSaveAsFilename Brad Patterson Excel Programming 1 July 21st 03 04:01 AM


All times are GMT +1. The time now is 11:48 AM.

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"