(Solved) – Using message box output as variables as input to VBA code


The below code doesn’t work on the 4th line. If some one can help.
I would like to use the information from the input box to feed in to the VBA code.
if the msg box says b25, I would want it copy the data from b25 and paste it in another sheet as shown below.


Sub MsgBoxYesNoCancel()

input_Cells = InputBox("Input column")
MsgBox "Want to Continue?", vbYesNoCancel
input_Celli = InputBox("Input row number")

ActiveSheet.Range("'input_Cells' & 'input_Celli'").Copy
Range("G36").PasteSpecial xlPasteValues

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *