Hello,
Looking for some help with some code. I managed to search and then modified the code to work for me so far, but need a bit of help to get it the last bit to make it perfect.
The code takes data from 3 cells and inputs the data into the save-as dialog box and lets you make changes to the file name and/or save location if needed.
What I need to achieve is to take the data from cell H12 (the 3rd cell referenced in the code below) and have it ignore the last 2 words (which are separated by a comma). I know the could be put into a different cell to solve this problem, but they all need to be next to each other in sentence format and aligned to the left of the cell. This data will change and adjusting the cell width everything to have things line up isn't feasible.
Here's the code:
All help is greatly appreciated!
Looking for some help with some code. I managed to search and then modified the code to work for me so far, but need a bit of help to get it the last bit to make it perfect.
The code takes data from 3 cells and inputs the data into the save-as dialog box and lets you make changes to the file name and/or save location if needed.
What I need to achieve is to take the data from cell H12 (the 3rd cell referenced in the code below) and have it ignore the last 2 words (which are separated by a comma). I know the could be put into a different cell to solve this problem, but they all need to be next to each other in sentence format and aligned to the left of the cell. This data will change and adjusting the cell width everything to have things line up isn't feasible.
Here's the code:
Code:
Sub SaveAsString()
Dim strPath As String
Dim strFolderPath As String
strFolderPath = "D:\Fire Alarm Services\"
strPath = strFolderPath & _
Range("K1").Value & " " & _
Range("N10").Value & " " & _
Range("H12").Value & " " & _
Format(Range("H10").Value, "mmm dd yyyy") & ".xlsm"
fileSaveName = Application.GetSaveAsFilename(strPath _
, fileFilter:="Excel Files (*.xlsm), *.xlsm")
End Sub
All help is greatly appreciated!