Need suggestion for multiple messages

  • Thread starter Thread starter Merkling, Steven
  • Start date Start date
M

Merkling, Steven

More Specific Please

Thanks
-Merk
I'm looking for some help. My code is looking at a row of
data in a spreadsheet for 6 different conditions. If it
finds one, it adds a specific number to a counter. After
it reads the entire row, it displays 1 - 6 error messages
depending on the total in the counter.

However, with 6 error messages there is a fairly large
number of combinations of potential messages. I had
started using select case based on the total of the
counter to determine the messages to display but I'm not
sure that there isn't a better way to display the error
messages by trying to figure out all of the possible
combinations.

Thanks for the help.
 
I'm looking for some help. My code is looking at a row of
data in a spreadsheet for 6 different conditions. If it
finds one, it adds a specific number to a counter. After
it reads the entire row, it displays 1 - 6 error messages
depending on the total in the counter.

However, with 6 error messages there is a fairly large
number of combinations of potential messages. I had
started using select case based on the total of the
counter to determine the messages to display but I'm not
sure that there isn't a better way to display the error
messages by trying to figure out all of the possible
combinations.

Thanks for the help.
 
I'm looking for some help. My code is looking at a row of
data in a spreadsheet for 6 different conditions. If it
finds one, it adds a specific number to a counter. After
it reads the entire row, it displays 1 - 6 error messages
depending on the total in the counter.

However, with 6 error messages there is a fairly large
number of combinations of potential messages. I had
started using select case based on the total of the
counter to determine the messages to display but I'm not
sure that there isn't a better way to display the error
messages by trying to figure out all of the possible
combinations.

Thanks for the help.

Create a userform with a single textbox, centered and sized to the form.
Every time an error is generated, append the message to the end of the
text. Here's an example - assumes a form called UserForm1 with a textbox
called TextBox1 (creative, ain't I?):
Sub foo()
UserForm1.Show
UserForm1.Repaint
On Error GoTo ohShit
Do Until Done
' main loop here
Loop
UserForm1.TextBox1.Text = UserForm1.TextBox1.Text & "Finished."
Exit Sub

ohShit:
UserForm1.TextBox1.Text = UserForm1.TextBox1.Text & _
Err.Description & vbNewLine & vbNewLine
Err.Clear
Resume Next
End Sub
 
Back
Top