Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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
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
Pointer please KiwiBrian New Users to Excel 3 December 23rd 04 04:49 PM
pointer Gino Calderone Excel Discussion (Misc queries) 1 December 21st 04 10:39 PM
Another pointer please KiwiBrian Excel Discussion (Misc queries) 1 November 30th 04 04:18 AM
Pointer please KiwiBrian Excel Discussion (Misc queries) 3 November 29th 04 10:09 PM
A pointer or two needed using userform Jim[_32_] Excel Programming 1 October 20th 03 06:04 PM


All times are GMT +1. The time now is 11:59 AM.

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

About Us

"It's about Microsoft Excel"