I have got a userform which provides data for a macro. Once this macro is complete i would like to paste the values which were inputted in the userform to cells, with the use of a button. I have read that the userform cannot be unloaded which i dont think mine is as to close the userform i use the code:
userform1.hide
userform2.show
and then to close userform two i use the code:
userform2.hide
Also, when i open the userform back up the values that i have inputted remain.
The code i am using to try and print values from the text box is:
Sub copypaste2()
'code to copy and paste a graph and some text, using the macro recorder
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Copy
Sheets("Sheet1").Select
ActiveSheet.Pictures.Paste.Select
Sheets("sheet2").Select
Range("B7:G9").Select
Selection.Copy
Sheets("Sheet1").Select
Range("M5").Select
ActiveSheet.Paste
Range("K6").Select
'code to paste value from userform textbox to cell
Worksheets("sheet1").Range("M8").Value = UserForm1.baseflowtextbox.Value
end sub