To show a messagebox

P

pol

While running a macro , I need to show a message box with some instruction
to the users for the successful running of that macros. So please advice me
with a sample code to write a macro to show a messagebox with some
instruction.

With thanks

Pol
 
M

Mike H

Try this

Dim MyMessage As String
MyMessage = "You have to do these things to run my macro"
response = MsgBox(MyMessage, vbInformation)

Mike
 
P

pol

Thanks lot for the reply.

Also Please let me know to give that insturction line by line

For example
The instruction should be in message box as follows

1. Open the rebate.xls before macros
2. In Rebate.xls, there should be two page Item and discount
3. The result will be given from current cell upto the end of the item details

Please help to show the above instruction in a messagebox . as seperate line

With many thanks
Pol
 
M

Mike H

Hi,

Try this

Dim MyMessage As String
MyMessage = "Open the rebate.xls before macros" & Chr(13) & _
"In Rebate.xls, there should be two page Item and discount" & Chr(13) & _
"The result will be given from current cell upto the end of the item details"
response = MsgBox(MyMessage, vbInformation)

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top