Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to increase size of image in button (msocontrolbutton) of custom toolbar of Excel 2000

Image size appears in button(msocontrolbutton) of custom toolbar is
very small and blurred using below code. How I can increase size of
image in button (msocontrolbutton) as well as brightness of image in
custom toolbar?

It would be really great help for me......

My code:
'========================================

Const cImgCommandBarID As String = "TMC Img Toolbar"

'Image code

Dim cbImgBar As CommandBar

Set cbImgBar = CommandBars.Add(Name:=cImgCommandBarID,
Position:=msoBarTop)

'cbImgBar.context = 1000



Dim cbImage As CommandBarControl



Dim imgTool As Shape

Dim sFileName, ImgSheet

sFileName = ActiveWorkbook.Path & "\Images\ABC.jpg"

Const sNAME = "MyToolFace"



'================

' hide appearance of picture from the user

Application.ScreenUpdating = False



' insert picture from file and copy inserted picture

ActiveSheet.Pictures.Insert(sFileName).CopyPicture
Appearance:=xlScreen, Format:= xlBitmap



Set cbImage = cbImgBar.Controls.Add(Type:=msoControlButton)

With cbImage

'.FaceId = 198

.Caption = "TheMarketsImage"

.Style = msoButtonIcon

.Width = 120

.Height = 100

.PasteFace

End With

' remove the inserted picture

ActiveSheet.Pictures(ActiveSheet.Pictures.Count).D elete

Application.ScreenUpdating = True

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to increase size of image in button (msocontrolbutton) of custom toolbar of Excel padam Excel Discussion (Misc queries) 0 August 11th 06 07:18 PM
how to increase size of button's image of custom toolbar of Excel Padam Excel Programming 0 August 7th 06 03:39 PM
Load image from directory for custom toolbar of Excel 2000 Padam Excel Worksheet Functions 0 August 5th 06 06:33 PM
How do I create a custom image for a toolbar? [email protected] Excel Programming 2 July 7th 06 11:05 PM
How do I specify a custom paper size in Excel 2000 on Win XP? Vt Shriner Setting up and Configuration of Excel 1 April 2nd 06 07:23 PM


All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"