Good morning everyone,
I have one thing keeping this project from piloting. You would be my personal heros if you could help me out! Disclaimer: Novice to VBA who will be learning more in the coming months.
I have a Userform called "EscalationsForm". This userform has a Multipage object on it. Two of the multipage objects have buttons on them that I want to allow the user to Browse to a file and select it. I've used the following code to achieve that and to pass that filename as a string to a textbox so that the user can verify what they have attached:
How can I take the file that is specified and attach it to an email that is created by the Click event of a Submit button? So far, I've tried the "Attachments.Add fName" under the "With Outmail" statement but I'm thinking since I declared fName as a String that I can't pass it. Do I need to declare it as an Object?
Any help in this is, again, greatly appreciated! I can't wait until I can answer questions like you all do!
I have one thing keeping this project from piloting. You would be my personal heros if you could help me out! Disclaimer: Novice to VBA who will be learning more in the coming months.
I have a Userform called "EscalationsForm". This userform has a Multipage object on it. Two of the multipage objects have buttons on them that I want to allow the user to Browse to a file and select it. I've used the following code to achieve that and to pass that filename as a string to a textbox so that the user can verify what they have attached:
Code:
Private Sub cmdUHAAttach_Click()
Dim fName As String
fName = Application.GetOpenFilename()
If Not fName = "False" Then
tbUHADocAttached.Value = fName
End If
End Sub
How can I take the file that is specified and attach it to an email that is created by the Click event of a Submit button? So far, I've tried the "Attachments.Add fName" under the "With Outmail" statement but I'm thinking since I declared fName as a String that I can't pass it. Do I need to declare it as an Object?
Any help in this is, again, greatly appreciated! I can't wait until I can answer questions like you all do!