How do I use icons and pictures with Excel 4 dialog.box function

  • Thread starter Polymetals Chris
  • Start date
P

Polymetals Chris

The old Excel 4 dialog.box function has various permissible data types
accepted in the first field. 17 is icon and 23 is picture. How do I tell
Excel what the icon or picture is that I want to include?

Presumablty there is something to enter in the sixth field, but I cannot
work out a valid value or formula.

Can somebody give me a working example, please.
 
H

Héctor Miguel

hi, Chris !
The old Excel 4 dialog.box function has various permissible data types accepted in the first field.
17 is icon and 23 is picture. How do I tell Excel what the icon or picture is that I want to include?
Presumablty there is something to enter in the sixth field, but I cannot work out a valid value or formula...

- embed the picture (with)in your xl4 macro-sheet
- (while selected) give/assign/... a name to that (each ?) picture
- use "the name" as the 6th column value (same item row)

regards,
hector.
 
P

Polymetals Chris

Thanks Hector.

I was close but the naming of the embedded picture was the trick I missed.

However, I can only get it to work for type 23, picture. There's still no
joy with type 17, icon. I'm not quite certain what the different
consequences of using 17 or 23 are - 23 does what I wanted to do perfectly
well - but for curiosity I'd be interested in beating the icons.

Is the type of source file relevant? Or the method of embedding?

Chris
 
H

Héctor Miguel

hi, Chris
I was close but the naming of the embedded picture was the trick I missed.
However, I can only get it to work for type 23, picture.
There's still no joy with type 17, icon.
I'm not quite certain what the different consequences of using 17 or 23 are
- 23 does what I wanted to do perfectly well - but for curiosity I'd be interested in beating the icons.

Is the type of source file relevant? Or the method of embedding?

icon type (17) accepts only numbers 1 to 3 as follows:
(and the "icons" are their simil to vba: vbQuestion, vbInformation, vbExclamation)

1: ? (question mark)
2: i (information)
3: ! (alert triangle)

any "icon" referring to an image, shall be type 23

hth,
hector.
 
H

Héctor Miguel

hi, Chris !
... great. Appreciate you sharing ...

thanks for your feed-back
(and AFAIK, sharing is the way to keep it growing)

regards,
hector.
 
Top