MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Message box


Posted by Craig on November 21, 2001 7:46 AM

i wish to create a msge box that will appear when a file is opened in Excel. Is this possible?


Posted by Juan Pablo on November 21, 2001 8:18 AM

Yes, but it'll appear only when the files has opened completely.

Juan Pablo

Posted by craig on November 21, 2001 9:31 AM

i used.....

Sub Auto_open()
MsgBox ("Welcome!")
End Sub

is it possible to have something similar like

Sub Auto_open()
MsgBox ("Please insert you name")
textBox?
End Sub

So the can enter their details that would ultimately update a cell in the opened spreadhsheet?!!!??

Posted by Juan Pablo on November 21, 2001 9:33 AM

Sure... just use..

the InputBox method, it's similar to MsgBox, but this one accepts entries.

Juan Pablo

Posted by Craig on November 21, 2001 9:37 AM

Re: Sure... just use..

Thanks Juan
Where does the text that is entered go? can I send it to "A1"?

Posted by Juan Pablo on November 21, 2001 9:54 AM

Re: Sure... just use..

Sub Test()
Dim Str as String
Str = InputBox("Message here","Title")
Range("A1") = Str
End Sub

Posted by Craig on November 22, 2001 1:11 AM

YOU ARE A LEGEND JUAN PABLO!!

Thank you Sub Test()