LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Change Label1.Caption

VBcomponents is a whole pile more difficult than this needs to be. Add a
sheet and call it "Form Variables" or something like that... Now in the form
initialization add something like...

label1.caption = sheets("Form Variables").Range("A1").Value

For your button add
label1.caption = "MySting"
sheets("Form Variables").Range("A1").Value = "MySting"

Now the value of the label caption is stored in the sheet and it is
initialized at run time. if you don't want your users getting at the value
make the sheet very hidden
sheets("Form Variables").visible = xlVeryhidden


--
HTH...

Jim Thomlinson


"Soniya" wrote:

I am changing label1.caption by clicking commandbutton1.

I know code can be changed by using VBAProject.VBComponents.

but I could not get it to work in my case.

thanks


 
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
Change caption of a button Dylan @ UAFC[_2_] Excel Worksheet Functions 3 November 25th 08 07:04 PM
How to populate Label1.Caption with a variable's value Dave O Excel Discussion (Misc queries) 3 April 25th 08 03:20 PM
Label1 Jennifer Dixon Excel Discussion (Misc queries) 1 March 12th 08 02:12 PM
Commandbutton caption change peter.thompson[_6_] Excel Programming 6 December 22nd 05 06:29 AM
Change Caption of Button Alexander Excel Programming 3 August 17th 05 04:45 PM


All times are GMT +1. The time now is 08:40 PM.

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"