Arie Bos
Board Regular
- Joined
- Mar 25, 2016
- Messages
- 224
- Office Version
- 365
- Platform
- Windows
Hello Excelleers!
I am struggling with the following: I have a user form with a two buttons.
There are several variables used to create the folder and file, but I cannot get the to create the correct code to pull the file out and assign it to a variable, which can be used in the email definition.
I know this is a very open question. The codes are quite long, so I do not know if I can place them here. It seems I do not fully understand the rules of variables to be passed on from one sub to another.
I am struggling with the following: I have a user form with a two buttons.
- Button A is linked to a code that opens/shows a worksheet for the user to fill in data;
- With another button C on the worksheet, the worksheet code creates a folder and in that folder it saves a pdf from that worksheet. Both have the same name. After that, the worksheet is hidden and the user form pops up again. This works fine.
- On the user form, button B is meant to create an email with the saved file as an attachment.
There are several variables used to create the folder and file, but I cannot get the to create the correct code to pull the file out and assign it to a variable, which can be used in the email definition.
I know this is a very open question. The codes are quite long, so I do not know if I can place them here. It seems I do not fully understand the rules of variables to be passed on from one sub to another.