ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Function LoadResPicture ?!? (https://www.excelbanter.com/excel-programming/282417-function-loadrespicture.html)

Tom

Function LoadResPicture ?!?
 
Hi

I want to create a transparent icon and I found the following article, which
exactly contains the solution for my problem:

HOWTO: Add a Transparent Icon to a Toolbar Button
http://support.microsoft.com/?kbid=260850

The problem is, that the visual basic example contains the function
"LoadResPicture", which is not supported by Excel 2002. How to make this
example work? Any ideas?

Many thanks in advance!

Tom



Tom Ogilvy

Function LoadResPicture ?!?
 
try this article instead:

http://support.microsoft.com/default...71&Product=ofw
HOWTO: Create a Transparent Picture For Office CommandBar Buttons

Possibly related:

http://support.microsoft.com/default...17&Product=ofw
HOW TO: Set the Mask Property and the Picture Property for an Office 2003
CommandBar Button


--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hi

I want to create a transparent icon and I found the following article,

which
exactly contains the solution for my problem:

HOWTO: Add a Transparent Icon to a Toolbar Button
http://support.microsoft.com/?kbid=260850

The problem is, that the visual basic example contains the function
"LoadResPicture", which is not supported by Excel 2002. How to make this
example work? Any ideas?

Many thanks in advance!

Tom





Tom

Function LoadResPicture ?!?
 
Thanks


"Tom Ogilvy" schrieb im Newsbeitrag
...
try this article instead:

http://support.microsoft.com/default...71&Product=ofw
HOWTO: Create a Transparent Picture For Office CommandBar Buttons

Possibly related:

http://support.microsoft.com/default...17&Product=ofw
HOW TO: Set the Mask Property and the Picture Property for an Office 2003
CommandBar Button


--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hi

I want to create a transparent icon and I found the following article,

which
exactly contains the solution for my problem:

HOWTO: Add a Transparent Icon to a Toolbar Button
http://support.microsoft.com/?kbid=260850

The problem is, that the visual basic example contains the function
"LoadResPicture", which is not supported by Excel 2002. How to make this
example work? Any ideas?

Many thanks in advance!

Tom







Tom

Function LoadResPicture ?!?
 
Tom

thank you, but that is definitive too difficult for me. What I need is an
example that works with Excel. My script looks as follows:

Sub Example()
Dim cbrCtrl As CommandBarControl

ThisWorkbook.Worksheets(1).Shapes(1).Copy

Set cbrCtrl = Application.CommandBars("Tools").Controls.Add
With cbrCtrl
.Caption = "Hello World"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With
Application.CutCopyMode = False
End Sub

Now I'd like to make it work with the "transparent"-property. Many thanks in
advance.

Tom








"Tom Ogilvy" schrieb im Newsbeitrag
...
try this article instead:

http://support.microsoft.com/default...71&Product=ofw
HOWTO: Create a Transparent Picture For Office CommandBar Buttons

Possibly related:

http://support.microsoft.com/default...17&Product=ofw
HOW TO: Set the Mask Property and the Picture Property for an Office 2003
CommandBar Button


--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hi

I want to create a transparent icon and I found the following article,

which
exactly contains the solution for my problem:

HOWTO: Add a Transparent Icon to a Toolbar Button
http://support.microsoft.com/?kbid=260850

The problem is, that the visual basic example contains the function
"LoadResPicture", which is not supported by Excel 2002. How to make this
example work? Any ideas?

Many thanks in advance!

Tom







Tom Ogilvy

Function LoadResPicture ?!?
 
If you ronly problem with the original link you posted is the function
LoadResPicture, then change that

Set oICO = LoadResPicture(IconId, vbResIcon)

to

Set ico = LoadPicture("C:\dms\forms\rsignl.ico")

and copy your icon from an icon file. (change the path to point to your
file).

--
Regards,
Tom Ogilvy

"Tom" wrote in message
...
Tom

thank you, but that is definitive too difficult for me. What I need is an
example that works with Excel. My script looks as follows:

Sub Example()
Dim cbrCtrl As CommandBarControl

ThisWorkbook.Worksheets(1).Shapes(1).Copy

Set cbrCtrl = Application.CommandBars("Tools").Controls.Add
With cbrCtrl
.Caption = "Hello World"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With
Application.CutCopyMode = False
End Sub

Now I'd like to make it work with the "transparent"-property. Many thanks

in
advance.

Tom








"Tom Ogilvy" schrieb im Newsbeitrag
...
try this article instead:


http://support.microsoft.com/default...71&Product=ofw
HOWTO: Create a Transparent Picture For Office CommandBar Buttons

Possibly related:


http://support.microsoft.com/default...17&Product=ofw
HOW TO: Set the Mask Property and the Picture Property for an Office

2003
CommandBar Button


--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hi

I want to create a transparent icon and I found the following article,

which
exactly contains the solution for my problem:

HOWTO: Add a Transparent Icon to a Toolbar Button
http://support.microsoft.com/?kbid=260850

The problem is, that the visual basic example contains the function
"LoadResPicture", which is not supported by Excel 2002. How to make

this
example work? Any ideas?

Many thanks in advance!

Tom









Tom

Function LoadResPicture ?!?
 
Tom

What I need is a working example with an image, that is stored within the
Excel workbook. My example works fine with Excel 97 & 2000. With Excel 2002
the commandbar button looks strange, but with Excel it looks horrible!!!

Sub Example()
Dim cbrCtrl As CommandBarControl

ThisWorkbook.Worksheets(1).Shapes(1).Copy

Set cbrCtrl = Application.CommandBars("Tools").Controls.Add
With cbrCtrl
.Caption = "Hello World"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With
Application.CutCopyMode = False
End Sub


I need a working example for Excel 2002 and Excel 2003. I'm willing to pay
for it!!! If there is anybody out there who can help me please contact me.

Tom




"Tom Ogilvy" schrieb im Newsbeitrag
...
If you ronly problem with the original link you posted is the function
LoadResPicture, then change that

Set oICO = LoadResPicture(IconId, vbResIcon)

to

Set ico = LoadPicture("C:\dms\forms\rsignl.ico")

and copy your icon from an icon file. (change the path to point to your
file).

--
Regards,
Tom Ogilvy

"Tom" wrote in message
...
Tom

thank you, but that is definitive too difficult for me. What I need is

an
example that works with Excel. My script looks as follows:

Sub Example()
Dim cbrCtrl As CommandBarControl

ThisWorkbook.Worksheets(1).Shapes(1).Copy

Set cbrCtrl = Application.CommandBars("Tools").Controls.Add
With cbrCtrl
.Caption = "Hello World"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With
Application.CutCopyMode = False
End Sub

Now I'd like to make it work with the "transparent"-property. Many

thanks
in
advance.

Tom








"Tom Ogilvy" schrieb im Newsbeitrag
...
try this article instead:


http://support.microsoft.com/default...71&Product=ofw
HOWTO: Create a Transparent Picture For Office CommandBar Buttons

Possibly related:


http://support.microsoft.com/default...17&Product=ofw
HOW TO: Set the Mask Property and the Picture Property for an Office

2003
CommandBar Button


--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hi

I want to create a transparent icon and I found the following

article,
which
exactly contains the solution for my problem:

HOWTO: Add a Transparent Icon to a Toolbar Button
http://support.microsoft.com/?kbid=260850

The problem is, that the visual basic example contains the function
"LoadResPicture", which is not supported by Excel 2002. How to make

this
example work? Any ideas?

Many thanks in advance!

Tom












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

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