I have this code that is suppose to go to a directory and allow a user to define the file name and save in that directory. The only problem is, the code do not give an error of any kind and after you attempt to save and follow the path to where the file should be it is not there. I may have it totally wrong. Sorry for the lack of spaces, the forum is not letting me use "Enter"/"Return".
Code:
Dim I As Long
Dim RNG As Range
Set RNG = Sheets("CAF").Range("ag44")
For I = 1 To 7
If Me.Controls("CheckBox" & I).Value Then
RNG.Value = Me.Controls("CheckBox" & I).Caption
Set RNG = RNG.Offset(1)
End If
Next I
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("CAF")
Unload Me
'Print is next step
Dim sh As Worksheet
Set sh = ActiveSheet
Worksheets(Array("Printed CAF")).PrintOut
sh.Select
' ask user to save if they need to kclay
Response = MsgBox("Would you like to save this form before exiting? If so, save as Lot Number In initiated CAF folder on shared", vbYesNoCancel + vbCritical + vbDefaultButton2)
If Response = vbCancel Then
Exit Sub
ElseIf Response = vbNo Then
Exit Sub
ElseIf Response = vbYes Then
Dim Fs As String
ChDir "P:\Lab Folder\Corrective Action Archives"
Fs = Application.GetSaveAsFilename(fileFilter:="Microsoft Excel File (*.xls), *.xls")
If Fs = "False" Then
End If
End If
End Sub
Last edited: