lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
How can I make the second marco print out the values from the first macro?
for example I want to use the second marco to msg out x and y which are variable in first macro. Thank you so much.
How can I make the second marco print out the values from the first macro?
for example I want to use the second marco to msg out x and y which are variable in first macro. Thank you so much.
Code:
Sub myinputbox()
'to use msgbox
Dim x As Integer
Dim y As String
x = InputBox("enter a number")
y = InputBox("enter a name")
End Sub
Sub mymsgbox()
MsgBox (x)
MsgBox (y)
End Sub