Hi! I'm working on a macro which graphs columns selected with an input box, and I'm trying to change these input boxes to userforms (in order to decrease the amount of popups for the user). However, I'm unsure of how to assign cells selected in a userform to variables which can be used in a separate subroutine. (I'm new to creating userforms).

I know that this is a bit of a big ask, but any help would be greatly appreciated! Thanks so much!

Here is the code behind a command button in the userform which is *supposed* to save the data and close the userform:
Please Login or Register  to view this content.

Here is my attempt to use the userform data in a subroutine:
Please Login or Register  to view this content.


This is the graphing subroutine with inputboxes: (I bolded the parts which I believe are pertinent, and which I want to replace with userforms)
Please Login or Register  to view this content.