LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Programmatically create a label in a worksheet.

I am using excel 2003. How would I programmatically create a label in
a worksheet. The following doesn't work:
Dim mylabel As Label
mylabel.Visible = True
mylabel.Caption = "my caption"

Is there a way to programmatically create an array of labels by doing
Dim mylabels(5) as label?

Then could I create/delete the label as needed by using mylabel.create
(or whatever the appropriate method is) and mylabel.delete?

if I want a new function that performs an action on several different
labels can I give it a label/array of labels as a parameter by
declaring the function with something like:
Function my_label_function(changelabel as label) as integer

Thanks,
David
 
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
Programmatically create button on Excel worksheet (vb.net) valerashylin Excel Programming 2 March 19th 08 01:27 PM
How do I use a worksheet label to create a formula in Excel 2007? Reed P. Wyatt Excel Discussion (Misc queries) 2 July 7th 07 04:30 AM
How do I use a worksheet label to create a formula in Excel 2007? Reed P. Wyatt Excel Discussion (Misc queries) 0 July 6th 07 03:44 AM
label x-axis values programmatically [email protected] Charts and Charting in Excel 1 September 5th 06 03:04 AM
Create UserForm programmatically Ber Excel Programming 5 September 11th 05 11:20 AM


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

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

About Us

"It's about Microsoft Excel"