E
excelnut1954
There are 2 things I need help with.
1) The user lists some PO numbers to be processed within UserForm7. I
have a MsgBox in UserForm7 that tells the user during processing that
a PO# he entered was not found. I wanted to control the fonts in the
MsgBox so that it's easier to read, but I'm finding out that you
can't change the fonts of a messagebox within the macro. I know you
can other ways, but this will be used in multiple computers. An
alternative would be a UserForm.
So, I designed one (UserForm14) with just an OK button. I want the OK
button to send control back to continue the processing that was
interrupted in UserForm7. That's how it works with the MsgBox that I
currently have in UserForm7.
What code can I put in the OK button of UserForm14 to make it continue
where it left off in UserForm7. Can you switch control back like this?
'OK button in UserForm14
Private Sub CommandButton1_Click()
'OK button
End Sub
2) I put a Textbox in UserForm14 that will show the PO# that caused
the interruption in UserForm7. I tried to put an Initialize statement
in UserForm14 to show the PO# in question. But, it's not showing up.
Here's what I have in UserForm14 for TextBox1.
Private Sub UserForm_Initialize()
PONum = TextBox1
End Sub
Here's part of UserForm7 that shows how the value of PONum is set.
Dim PONum As String
Worksheets("Official List").Activate
If Me.Controls("TextBox" & i * 2 - 1).Text <> "" Then
PONum = Me.Controls("TextBox" & i * 2 - 1).Text
CountPOtoValidate = Application.CountIf(Range("J:J"), PONum)
Am I correct in thinking that PONum is the correct variable to use in
the UserForm14 Initiialize statement? Maybe a declaration statement in
UserForm14 is needed?
Any help would be appreciated, as always.
Thanks,
J.O.
1) The user lists some PO numbers to be processed within UserForm7. I
have a MsgBox in UserForm7 that tells the user during processing that
a PO# he entered was not found. I wanted to control the fonts in the
MsgBox so that it's easier to read, but I'm finding out that you
can't change the fonts of a messagebox within the macro. I know you
can other ways, but this will be used in multiple computers. An
alternative would be a UserForm.
So, I designed one (UserForm14) with just an OK button. I want the OK
button to send control back to continue the processing that was
interrupted in UserForm7. That's how it works with the MsgBox that I
currently have in UserForm7.
What code can I put in the OK button of UserForm14 to make it continue
where it left off in UserForm7. Can you switch control back like this?
'OK button in UserForm14
Private Sub CommandButton1_Click()
'OK button
End Sub
2) I put a Textbox in UserForm14 that will show the PO# that caused
the interruption in UserForm7. I tried to put an Initialize statement
in UserForm14 to show the PO# in question. But, it's not showing up.
Here's what I have in UserForm14 for TextBox1.
Private Sub UserForm_Initialize()
PONum = TextBox1
End Sub
Here's part of UserForm7 that shows how the value of PONum is set.
Dim PONum As String
Worksheets("Official List").Activate
If Me.Controls("TextBox" & i * 2 - 1).Text <> "" Then
PONum = Me.Controls("TextBox" & i * 2 - 1).Text
CountPOtoValidate = Application.CountIf(Range("J:J"), PONum)
Am I correct in thinking that PONum is the correct variable to use in
the UserForm14 Initiialize statement? Maybe a declaration statement in
UserForm14 is needed?
Any help would be appreciated, as always.
Thanks,
J.O.