Bonjour le forum,
J'ai posté un message ce matin à propos des userforms, si quelqu'un en a besoin...
J'ai une nouvelle question, comment fait on pour passer un userform en tant que variable à une procédure?
Voilà mon code:
Voici ma procédure qui met les userform en plein écran et qui ajuste les controls du userform
Sub taille_USF(ByVal oUF As UserForm)
Dim ctl As Control
Dim ratow As String
Dim ratioh As String
ratiow = Application.Width / oUF.Width
ratioh = Application.Height / oUF.Height
oUF.Left = 0
oUF.Top = 0
oUF.Width = Application.Width
oUF.Height = Application.Height
For Each ctl In oUF.Controls
ctl.Left = ctl.Left * ratiow
ctl.Top = ctl.Top * ratioh
ctl.Width = ctl.Width * ratiow
ctl.Height = ctl.Height * ratioh
ctl.FontSize = ctl.FontSize * ratioh
Next
End Sub
Voici mon appel de ma procédure mais j'ai une erreur de type "438" Propriété ou methode non géré par l'objet
call taille_USF (Userform1)
Quelqu'un à une idée SVP?