samerickson89
New Member
- Joined
- Jun 13, 2019
- Messages
- 38
I've got a command button that prints my workbook to a PDF with a specified filename and location, but I've been asked to add the option to save to one of two folders (without being able to browse to other folders). I'm trying to use a user form to choose the folder name, save it as a string variable, and append it to the file path. Two things I'm having trouble with are:
1) How do I make the user form assign a value to a string variable based on which option button is selected?
2) How do I set up an "OK" button on the user form (closes the user form and continues the module it was opened from)?
I would want the user to select either the "FCAD" or "PDL" option button on the user form, which would then be added to the file path after "\Completed RI Reports"
I'm also open to other approaches, if you have something simpler or more efficient. Thanks in advance for any help!
1) How do I make the user form assign a value to a string variable based on which option button is selected?
2) How do I set up an "OK" button on the user form (closes the user form and continues the module it was opened from)?
Code:
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:=ActiveWorkbook.Path & "\Completed RI Reports\" & OutName, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
I would want the user to select either the "FCAD" or "PDL" option button on the user form, which would then be added to the file path after "\Completed RI Reports"
I'm also open to other approaches, if you have something simpler or more efficient. Thanks in advance for any help!