View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Darv Darv is offline
external usenet poster
 
Posts: 12
Default 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