Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing object properties permanently at runtime
Hi,
I'm having trouble changing the properties of objects permanently at runtime. Specifically, I am trying to make a commandbutton visible at runtime. This works fine, but when I reset the VBA code, the commandbutton returns to it's state prior to running the code. Thanks for any help anyone can give. David |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing object properties permanently at runtime
David,
Yes, that is the difference in meaning between "Design Time" and "Run Time". If you want a property to be set for the next time you open that workbook, you need to change it the Design time. NickHK "Darv" wrote in message oups.com... Hi, I'm having trouble changing the properties of objects permanently at runtime. Specifically, I am trying to make a commandbutton visible at runtime. This works fine, but when I reset the VBA code, the commandbutton returns to it's state prior to running the code. Thanks for any help anyone can give. David |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing object properties permanently at runtime
Hi Nick,
I understand that, but is it possible to change a design time property at runtime? David |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing object properties permanently at runtime
Hi David,
Sub Test() Dim dForm As UserForm Set dForm = ThisWorkbook.VBProject.VBComponents("Userform1").D esigner dForm.CommandButton2.Caption = Time End Sub You can't do this while Userform1 is loaded (AFAIK). Can also add/delete controls. (You'll need trust access to vb projects in xl2002+) Regards, Peter T "Darv" wrote in message ups.com... Hi Nick, I understand that, but is it possible to change a design time property at runtime? David |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing object properties permanently at runtime
Perfect thanks!
Peter T wrote: Hi David, Sub Test() Dim dForm As UserForm Set dForm = ThisWorkbook.VBProject.VBComponents("Userform1").D esigner dForm.CommandButton2.Caption = Time End Sub You can't do this while Userform1 is loaded (AFAIK). Can also add/delete controls. (You'll need trust access to vb projects in xl2002+) Regards, Peter T "Darv" wrote in message ups.com... Hi Nick, I understand that, but is it possible to change a design time property at runtime? David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Permanently Changing a Toolbar | Excel Discussion (Misc queries) | |||
How to check Solver and Forms 2.0 Object Library permanently? | Excel Discussion (Misc queries) | |||
Changing print settings permanently | Excel Discussion (Misc queries) | |||
RUNTIME 424 OBJECT REQUIRED??? | Excel Programming | |||
Changing Properties of a Range object after initial Dimensions ?? | Excel Programming |