Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to force userform to display everything?

If I do the following...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
end with

The form displays but the text box doesn't show. It's as if the form had
no controls. However, if I add a msgbox command...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
msgbox "Press OK to continue.."
end with

The modal form displays correctly.

How can I get the modal form to do what I want without having to wait
for input, which defeats the whole purpose of using a modal form to pass
information?

Regards, John M
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default How to force userform to display everything?

John,

I can't reproduce, so just a guess - maybe Repaint would force it:

With UserForm1
.TextBox1.Value = "Some text to display"
.Show (modal)
.Repaint
End With

hth,

Doug Glancy

"John Mitchell" wrote in message
...
If I do the following...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
end with

The form displays but the text box doesn't show. It's as if the form had
no controls. However, if I add a msgbox command...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
msgbox "Press OK to continue.."
end with

The modal form displays correctly.

How can I get the modal form to do what I want without having to wait
for input, which defeats the whole purpose of using a modal form to pass
information?

Regards, John M



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to force userform to display everything?

Doug

Thanks. That did the trick.

Regards, John M

Doug Glancy wrote:
John,

I can't reproduce, so just a guess - maybe Repaint would force it:

With UserForm1
.TextBox1.Value = "Some text to display"
.Show (modal)
.Repaint
End With

hth,

Doug Glancy

"John Mitchell" wrote in message
...

If I do the following...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
end with

The form displays but the text box doesn't show. It's as if the form had
no controls. However, if I add a msgbox command...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
msgbox "Press OK to continue.."
end with

The modal form displays correctly.

How can I get the modal form to do what I want without having to wait
for input, which defeats the whole purpose of using a modal form to pass
information?

Regards, John M




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to force userform to display everything?

Note that you are showing your userform as a Modeless userform (not modal as
you claim). Modal would mean that it retains the focus until dropped.

(modal)
is not a constant and resolves to 0 as you use it. Zero is the value of the
defined constant vbModeless

? vbModeless
0
The constant for modal is

? vbModal
1

It usually helps to use correct terminology.


--
Regards,
Tom Ogilvy

"John Mitchell" wrote in message
...
Doug

Thanks. That did the trick.

Regards, John M

Doug Glancy wrote:
John,

I can't reproduce, so just a guess - maybe Repaint would force it:

With UserForm1
.TextBox1.Value = "Some text to display"
.Show (modal)
.Repaint
End With

hth,

Doug Glancy

"John Mitchell" wrote in message
...

If I do the following...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
end with

The form displays but the text box doesn't show. It's as if the form had
no controls. However, if I add a msgbox command...

with userform1
.textbox1.value = "Some text to display"
.show (modal)
msgbox "Press OK to continue.."
end with

The modal form displays correctly.

How can I get the modal form to do what I want without having to wait
for input, which defeats the whole purpose of using a modal form to pass
information?

Regards, John M






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
display userform Anthony Excel Discussion (Misc queries) 3 February 27th 07 04:02 PM
UserForm: force to update controlsources Gabor Excel Programming 0 August 8th 04 03:01 AM
How to cause userform to display Jim[_31_] Excel Programming 4 November 28th 03 11:00 PM
How? Force Sheet1 to display each time the workbook is opened. lothario[_26_] Excel Programming 2 October 17th 03 06:40 AM
Must be a way to force focus back to sheet instead of UserForm - isn't there? Les[_4_] Excel Programming 2 July 29th 03 12:45 PM


All times are GMT +1. The time now is 07:04 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"