ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox - place and size? (https://www.excelbanter.com/excel-programming/330854-msgbox-place-size.html)

Einar

MsgBox - place and size?
 
Hi everybody.
How do I Place a msgbox or textbox right over a spesific cell?

My makro looks like:

Sub MyMacro()
Sheets("One").Activate
Range("A17:D17").Select
MsgBox "Text" & Chr(13) & Chr(13), vbInformation + vbOKOnly, "Title"
End Sub

I have tryed, top:=100, left:=100, but it wont work.
I want to place the MsgBox rigth over A17:D17

Is there enyone who know how to set the size of the MsgBox too?

Einar

Tom Ogilvy

MsgBox - place and size?
 
If you want that type of control, the easiest thing to do is use a userform.
Otherwise, you will have to utilize the windows API to handle the message
box as a window.

In any event, the msgbox sizes dynamically according to the Message in the
box. It doesn't accept any arguments for size or position.

--
Regards,
Tom Ogilvy



"Einar" wrote in message
...
Hi everybody.
How do I Place a msgbox or textbox right over a spesific cell?

My makro looks like:

Sub MyMacro()
Sheets("One").Activate
Range("A17:D17").Select
MsgBox "Text" & Chr(13) & Chr(13), vbInformation + vbOKOnly, "Title"
End Sub

I have tryed, top:=100, left:=100, but it wont work.
I want to place the MsgBox rigth over A17:D17

Is there enyone who know how to set the size of the MsgBox too?

Einar





All times are GMT +1. The time now is 08:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com