LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default modeless userform problem

Hello,

My goal with the code below was to check if the user had entered a vendor
name for each item that had been ordered. The userform is shown if a vendor
name is missing, and I want them to be able to add it while the userform is
on the screen. The problem is that the loop runs all the way through, as
the userform is modeless. Is there a way around this? (Can I stop the loop
until the user clicks ok on the userform, and have the userform modeless at
the same time?)

Thanks in advance.

AD108

Sub ValidateOrder()
Dim rngCell As Range
Dim intRow As Integer
Dim intCol As Integer
Dim rngVendor As String
Dim strItem As String
Dim msg As String

For Each rngCell In Sheets(14).Range("AG3:AG398")
If rngCell.Value < 0 Then
intRow = rngCell.Row
intCol = rngCell.Column
Sheets(2).Activate
rngVendor = Cells(intRow, 39).Value
If rngVendor = "" Then
strItem = Cells(intRow, 3)
msg = "Please enter a Vendor for "
msg = msg & strItem
UserForm3.Label1.Caption = msg
UserForm3.Show vbModeless
End If
End If
Next rngCell
End Sub


 
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
Modeless userform hngo New Users to Excel 2 July 13th 05 09:23 AM
Modeless userform OLEObject Add problem jjk Excel Programming 5 May 26th 05 12:23 AM
Modeless Userform problem Harald Staff Excel Programming 1 September 3rd 04 06:28 PM
Modeless Userform problem Robin Hammond[_2_] Excel Programming 0 September 2nd 04 02:29 PM
modeless userform jacob Excel Programming 1 May 4th 04 02:53 PM


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