Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Pictures in file

Gents

upon opening a file I included some code to add a commandbar to excel. At this stage, I load an external image to display as button.

Question: how can I include those (10) small bitmaps inside the workbook so I don't need external files (looks messy

(I've tried to include them as pictures and then load from there, but can get it to work

Thanks in advanc
Christof
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Pictures in file

Hi,

This will put a picture from a sheet to a commandbar
control. You'll have to create a sheet named "Pictures"
and a image called "Pic_1" to run this example.

Dim CBCtrl As CommandBarControl

Set CBCtrl = CBPopUp.CommandBar.Controls.Add
(msoControlButton)

ThisWorkbook.Worksheets("Pictures").Activate

ThisWorkbook.Worksheets("Pictures").Shapes
("Pic_1").Select

Selection.Copy
CBCtrl.PasteFace

Hope this helped.

/Nicke
-----Original Message-----
Gents,

upon opening a file I included some code to add a

commandbar to excel. At this stage, I load an external
image to display as button.

Question: how can I include those (10) small bitmaps

inside the workbook so I don't need external files (looks
messy)

(I've tried to include them as pictures and then load

from there, but can get it to work)

Thanks in advance
Christof
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Pictures in file

Yes, Thanks it helped

However
1. is there a similar way to set the mask of a button
2. why is this PasteFace method hidden and undocumpented? Is there a way to find out more about hidden functions
3. In terms of compatibility, is it wise to use hidden functions

Christof
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 do you export pictures from my pictures file into a word docu Becky New Users to Excel 1 November 20th 09 07:02 PM
How to import a word file with text and pictures into Excel? malem Excel Discussion (Misc queries) 1 December 6th 07 03:26 PM
All pictures disappear from my whole excel file when I use 'hidden greencecil Excel Worksheet Functions 2 December 13th 05 09:25 AM
How to export all chartobjects in a sheet to powerpoint (creating a new ppt file) as pictures? Gunnar Johansson Charts and Charting in Excel 1 May 9th 05 05:10 AM
adding pictures to an excel file that are on a cd dogisnuts Excel Discussion (Misc queries) 1 April 27th 05 11:29 AM


All times are GMT +1. The time now is 03:11 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"