Resizing a Form in VBA

A

Ayo

I am trying to resize a form that I created. I was able to expand the form
from 216.75 to 344 but when I try to go back to 216.75, the form is still
showing the lower parts that I am trying to hide. And when I try to move the
form, I get the trailing shadow effect. Here the the code I was using:
Private Sub cmdWeekly_Click()

If Me.cmdWeekly.Caption = "More Options >>" Then
Me.Height = 344
Me.cmdWeekly.Caption = "More Options <<"
Me.frmReport.Enabled = False
Me.optBoth.Enabled = False
Me.optToday.Enabled = False
Me.optTomorrow.Enabled = False
Me.cmdBuildReport.Enabled = False
Else
Me.Height = 216.75
Me.cmdWeekly.Caption = "More Options >>"
Me.frmReport.Enabled = True
Me.optBoth.Enabled = True
Me.optToday.Enabled = True
Me.optTomorrow.Enabled = True
End If
Me.Repaint
End Sub

Any ideas?

Thanks
 
A

Ayo

I figured it out. Just needed to add "Application.ScreenUpdating = True"
somewhere in the coding.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top