Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2005, 07:34 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Userform - Modeless

Hi
I've problems with modeless userforms. Whenever I put in
 Userform1.Show

Note: the form has a label with a "please wait" message.

It will show the modeless form with a blanked out (white) message area while another process is running in the background.

Anyone knows what's wrong with it? Or have I missed out something.
 
Old January 21st, 2005, 06:56 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

are you using the following syntax...

Userform1.show vbmodeless


cheers

Matthew


 
Old January 24th, 2005, 06:48 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Matt

Tried the syntax but still no luck. The message area in modless still blanks out when shown. I've tried loading it before showing... but still doesn't work. Any ideas?

Chris

Quote:
quote:Originally posted by mjppaba
 are you using the following syntax...

Userform1.show vbmodeless


cheers

Matthew


 
Old January 24th, 2005, 07:39 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What version of Excel are you using, because versions earlier than 2000 are not able to utilise modeless forms.

Matthew

 
Old January 24th, 2005, 07:40 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excel 2003.

Chris
 
Old January 24th, 2005, 10:44 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Chris

Is it possible to export the form and post the *.frm and *.frx files here, alternavely you can email them to me.

Matthew



 
Old January 24th, 2005, 10:57 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Matt
I'll email the file to you. Where shall I send it to?

Thanks
Chris
 
Old January 24th, 2005, 02:18 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

[email protected]

cheers

M

 
Old January 25th, 2005, 06:56 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

All is now clear.

add the line DoEvents to your code as shown below...


Sub Print_Preview(sAreaStart As String, sAreaEnd As String, sTitleRows As String, sTitleCols As String)
    Dim sTitleRowsCheck, sTitleColsCheck As String
    frmWait.Show vbModeless
    DoEvents
    With ActiveSheet.PageSetup


then you'll find it works. The DoEvents allows the Modeless form to update itself before continuing the rest of the work.



Cheers

Matthew
PS sorry for the wait, i've been a bit busy today.

 
Old January 26th, 2005, 04:51 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent. It works perfectly.

Thanks for the tip Matt.

Cheers
Chris





Similar Threads
Thread Thread Starter Forum Replies Last Post
modeless userform randomwanderer Excel VBA 3 December 3rd, 2008 08:59 AM
Modeless Userform, without blue border or "x" maxpotters Excel VBA 1 March 25th, 2005 06:17 AM
Dynamic modeless UserForm robin_lotr Excel VBA 2 February 10th, 2005 06:19 PM
MDI vs. modeless and floating windows Isen C# 3 July 9th, 2004 12:15 PM
Javascript "alert()" acts modeless cppman Javascript 2 September 16th, 2003 09:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.