Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userform with a button that does the following:
Private Sub PanicSwitch_Click() Dim AUserFile As Variant 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 AUserFile = Application.GetSaveAsFilename(??? ThisWorkbook.SaveAs Filename:=AUserFile End Sub I'm trying to set the InitialFilename parameter as follows: Center C&A PF Month YR Wk # analyst initials The user will select Center, Month and Wk # in the userform. We have a specific filenaming protocol so and I need to match it. Here's an example: Say John Smith is in the userform. He'll select his name as John Smith, his Center as GSO, his Month as April, his Week as Week 3. I need to somehow use this information to set up InitialFilename. Here's what it should look like: GSO C&A PF Apr 09 wk 3 js Here's another example to make it clear: Say Grace Henriques is in the form. She'll select her name as Grace Henriques, her Center as VHeathrow, her Month as December, her Week as Week 1. This is what her filename should save as: VHeathrow C&A PF Dec 09 wk1 gh I imagine the syntax will look something like this: AUserFile = Application.GetSaveAsFilename(CenterSelect & " C&A PF " & MonthRSelect & " 09 " & WeekSelect & "NameSelect", additional parameters etc) But as you can see from the file naming protocol I only need the first 3 letters of the month, I need the week to show as "wk1", "wk2" etc, and I only need the the users initials on the end. Any advice? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
GetSaveAsFilename | Excel Programming | |||
a question about "Application.GetSaveAsFileName" | Excel Programming | |||
Help with GetSaveAsFilename | Excel Programming | |||
GetSaveAsFileName | Excel Programming | |||
File save location with Application.GetSaveAsFilename | Excel Programming |