Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 11th, 2006, 02:03 PM
Registered User
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Increase size of image in button of Excel Toolbar

Excel 2000 version only
Image size appears in button(msocontrolbutton) of custom toolbar Excel 2000 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?

I am able to increase size of button using width and height property but image appears in center of button as 16X16. How to fit image to button(msocontrolbutton)?

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


    End With

    ' remove the inserted picture

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

    Application.ScreenUpdating = True

Similar Threads
Thread Thread Starter Forum Replies Last Post
increase DB size RinoDM SQL Server 2000 1 December 7th, 2006 01:25 AM
increase caching size in Classic ASP page crmpicco Classic ASP XML 0 April 4th, 2006 11:28 AM
Can I Increase The Size Of The Document Window WalterD Dreamweaver (all versions) 2 February 19th, 2005 07:13 PM
How to increase the size of a text feild qazi_nomi Access 1 June 15th, 2004 03:30 AM
increase the size of the array Beulah ASP.NET 1.0 and 1.1 Basics 1 September 12th, 2003 08:54 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.