Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pointer to a userform
Hi,
how can I set a pointer to an existing userform. I tried this to use in an module public fME as Userform function Set_Form() fME.Height = 315 fME.Width = 390 end function In the Userform Initialize section Private Sub UserForm_Initialize() Set fME = ME Set_Form End Sub .... but I can't assign my userform to the global pointer (nor can I when I substitute de ME to Userforms("myForm") or something like that. Any help is appreciated Jos Vens |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pointer to a userform
Why not just pass the form as an argument to the sub:
'form code Private Sub UserForm_Initialize() SetForm Me, 390, 315 End Sub 'in module Option Private Module Public Sub SetForm(frmInput As UserForm1, dWidth As Double, dHeight As Double) With frmInput .Height = dHeight .Width = dWidth End With End Sub Robin Hammond www.enhanceddatasystems.com "Jos Vens" wrote in message ... Hi, how can I set a pointer to an existing userform. I tried this to use in an module public fME as Userform function Set_Form() fME.Height = 315 fME.Width = 390 end function In the Userform Initialize section Private Sub UserForm_Initialize() Set fME = ME Set_Form End Sub ... but I can't assign my userform to the global pointer (nor can I when I substitute de ME to Userforms("myForm") or something like that. Any help is appreciated Jos Vens |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pointer to a userform
Thanks Robin,
Jos "Robin Hammond" schreef in bericht ... Why not just pass the form as an argument to the sub: 'form code Private Sub UserForm_Initialize() SetForm Me, 390, 315 End Sub 'in module Option Private Module Public Sub SetForm(frmInput As UserForm1, dWidth As Double, dHeight As Double) With frmInput .Height = dHeight .Width = dWidth End With End Sub Robin Hammond www.enhanceddatasystems.com "Jos Vens" wrote in message ... Hi, how can I set a pointer to an existing userform. I tried this to use in an module public fME as Userform function Set_Form() fME.Height = 315 fME.Width = 390 end function In the Userform Initialize section Private Sub UserForm_Initialize() Set fME = ME Set_Form End Sub ... but I can't assign my userform to the global pointer (nor can I when I substitute de ME to Userforms("myForm") or something like that. Any help is appreciated Jos Vens |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pointer please | New Users to Excel | |||
pointer | Excel Discussion (Misc queries) | |||
Another pointer please | Excel Discussion (Misc queries) | |||
Pointer please | Excel Discussion (Misc queries) | |||
A pointer or two needed using userform | Excel Programming |