PC Review


Reply
Thread Tools Rate Thread

add a .jpg to msg box

 
 
=?Utf-8?B?cHN3YW5pZQ==?=
Guest
Posts: n/a
 
      10th Jul 2007
the following is the code i got at the moment.

how do i (if possible) add a .jpg?

c:/pswanie/pic.jpg

Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do u want to print the inventory?" ' Define message.
Style = vbOKCancel ' Define buttons.
Title = "pswanie t/a janphi" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbOKCancel Then ' User chose Yes.

Application.Run "INVENTRY.xls!newdayclear.newdayclear"

Else ' User chose No.


ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.MoveAfterReturnDirection = xlDown
Sheets("data").Select
Range("A111").Select


End If

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGZsdWdz?=
Guest
Posts: n/a
 
      10th Jul 2007
I don't know for sure, but I don't think this is possible with a standard
msgbox. Consider using a custom userform. Within the UserForm toolbok is an
"Image" control. Add one to your userform, size and name it, and define the
picture using the Properties Explorer and Picture Porperty.

Hth,
Pflugs

"pswanie" wrote:

> the following is the code i got at the moment.
>
> how do i (if possible) add a .jpg?
>
> c:/pswanie/pic.jpg
>
> Dim Msg, Style, Title, Help, Ctxt, Response, MyString
> Msg = "Do u want to print the inventory?" ' Define message.
> Style = vbOKCancel ' Define buttons.
> Title = "pswanie t/a janphi" ' Define title.
> Help = "DEMO.HLP" ' Define Help file.
> Ctxt = 1000 ' Define topic
> ' context.
> ' Display message.
> Response = MsgBox(Msg, Style, Title)
> If Response = vbOKCancel Then ' User chose Yes.
>
> Application.Run "INVENTRY.xls!newdayclear.newdayclear"
>
> Else ' User chose No.
>
>
> ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
> Application.MoveAfterReturnDirection = xlDown
> Sheets("data").Select
> Range("A111").Select
>
>
> End If
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:53 PM.