Confused.
You aleady know the message text as you supply it to the msgbox function. Simply store in variable and write out the variable if OK was pressed
![]()
Sub MsgBoxIntoCell() Dim Text as string Text = "this message goes to the cell in tab." If MsgBox(Text, vbOKCancel) = vbOK then [A1].Value = Text End If End Sub
Bookmarks