Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with perplexing form problem

I am using VBA in Excel XP with Win 2K. PLEASE help me with this issue

I have a user form on which there is a single control (calendar control 10.0). I have simple code attached to a button on a sheet that opens the form obtains the date the user double clicked and then dismisses the form again.

Everything works fine except: every time the form is opened it gets a little smaller. It will even cut off the right edge of the calendar control obscuring the last day of the week from view.

The height and width properties of the form are changed, even though I manually set them before hand to the correct size

Please advise me on this, what is going on?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with perplexing form problem

Private Sub Userform_Initialize()
userform.Width = 30
userform.Height = 40
End Sub

Might help, but I can't say why it is happening.

--
Regards,
Tom Ogilvy

"Frustrated" wrote in message
...
I am using VBA in Excel XP with Win 2K. PLEASE help me with this issue.

I have a user form on which there is a single control (calendar control

10.0). I have simple code attached to a button on a sheet that opens the
form obtains the date the user double clicked and then dismisses the form
again.

Everything works fine except: every time the form is opened it gets a

little smaller. It will even cut off the right edge of the calendar control
obscuring the last day of the week from view.

The height and width properties of the form are changed, even though I

manually set them before hand to the correct size.

Please advise me on this, what is going on?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Help with perplexing form problem

Are you unloading the form or just hiding when you "dismiss" it?

As a fix, I guess you could set the height and width in the
userform_initialize event or userform_activate event, but maybe that
wouldn't work any better than doing it as you have been:

Me.Height = 100
Me.Width = 200

hth,

Doug

"Frustrated" wrote in message
...
I am using VBA in Excel XP with Win 2K. PLEASE help me with this issue.

I have a user form on which there is a single control (calendar control

10.0). I have simple code attached to a button on a sheet that opens the
form obtains the date the user double clicked and then dismisses the form
again.

Everything works fine except: every time the form is opened it gets a

little smaller. It will even cut off the right edge of the calendar control
obscuring the last day of the week from view.

The height and width properties of the form are changed, even though I

manually set them before hand to the correct size.

Please advise me on this, what is going on?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with perplexing form problem

Actually, I am "hiding" it. How should I be dismissing the dialog?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with perplexing form problem

Thanks Tom and Doug.

I fixed the issue by adding the sizing code to the form initialize event. This works, but I still don't know why this occurs to begin with...oh well.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Help with perplexing form problem

use the "Unload" method. Read about it in Help, but the basic syntax is:

"Unload UserForm1"
or, if from inside the Form, you can say "Unload Me"

hth,

Doug

"Frustrated" wrote in message
...
Actually, I am "hiding" it. How should I be dismissing the dialog?



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with perplexing form problem

Thanks again Doug

I'm much less "frustrated" now.
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
New to Excel 2007 with a perplexing MACRO question Tangohammerli Excel Discussion (Misc queries) 2 February 22nd 08 02:36 AM
User Form Problem DCSwearingen Excel Discussion (Misc queries) 2 December 30th 05 03:42 PM
User Form Problem DCSwearingen Excel Discussion (Misc queries) 0 December 29th 05 11:04 PM
problem with user form chris[_3_] Excel Programming 1 July 15th 03 03:40 AM


All times are GMT +1. The time now is 04:00 AM.

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

About Us

"It's about Microsoft Excel"