Hi Everyone
I am declaring the result from a msgbox (triggered from a UserForm - named frmSizesASAdd - command button click) as given below (at the very top of the UserForm Module).
The code is as below -
Public DelOnly As VbMsgBoxResult
Private Sub *********_Click()
End Sub
Private Sub *********_Click()
End Sub
Private Sub cmdfrmSizesASAdd_Click()
Dim r As Long, c As Long
r = ActiveCell.Row
c = ActiveCell.Column
If ActiveCell.Offset(0, 11) <> "" Then
DelOnly = msgbox("Will you be making updates to any of the INGREDIENTS FIELDS for " & vbNewLine _
& Cells(r, 2), vbYesNo + vbQuestion + vbDefaultButton1, "PROCESS FLOW CONFIRMATION")
End If
frmIngrPrices.Show
code _________________
code__________________
End Sub
I am trying to access the above DelOnly variable in the below subroutine that is written in a different UserForm named frmIngrPrices but the DelOnly variable is return "Empty" value.
Private Sub cmdfrmIngrPrices_Click()
Dim NRow_Vcount As Long
NRow_Vcount = Range("BC6", Range("BC6").End(xlDown)).Count - 2
If DelOnly = vbYes then
Call SizePriceExtraction(NRow_Vcount)
Please note that the reason I am capturing the msgbox results in the first UserForm is that after the cmdfrmIngrPrices_Click() event is executed I need the code to come back to frmSizesASAdd and execute another UserForm procedure based on the result captured in DelOnly.
How can I call the DelOnly variable, declared and captured in the primary UserForm (frmSizesASAdd) across 2 other UserForms(frmIngrPrices and frmSizePrices) both secondary UserForms triggered using the same command button in UserForm (frmSizesASAdd)?
Please assist. Thanks.
I am declaring the result from a msgbox (triggered from a UserForm - named frmSizesASAdd - command button click) as given below (at the very top of the UserForm Module).
The code is as below -
Public DelOnly As VbMsgBoxResult
Private Sub *********_Click()
End Sub
Private Sub *********_Click()
End Sub
Private Sub cmdfrmSizesASAdd_Click()
Dim r As Long, c As Long
r = ActiveCell.Row
c = ActiveCell.Column
If ActiveCell.Offset(0, 11) <> "" Then
DelOnly = msgbox("Will you be making updates to any of the INGREDIENTS FIELDS for " & vbNewLine _
& Cells(r, 2), vbYesNo + vbQuestion + vbDefaultButton1, "PROCESS FLOW CONFIRMATION")
End If
frmIngrPrices.Show
code _________________
code__________________
End Sub
I am trying to access the above DelOnly variable in the below subroutine that is written in a different UserForm named frmIngrPrices but the DelOnly variable is return "Empty" value.
Private Sub cmdfrmIngrPrices_Click()
Dim NRow_Vcount As Long
NRow_Vcount = Range("BC6", Range("BC6").End(xlDown)).Count - 2
If DelOnly = vbYes then
Call SizePriceExtraction(NRow_Vcount)
Please note that the reason I am capturing the msgbox results in the first UserForm is that after the cmdfrmIngrPrices_Click() event is executed I need the code to come back to frmSizesASAdd and execute another UserForm procedure based on the result captured in DelOnly.
How can I call the DelOnly variable, declared and captured in the primary UserForm (frmSizesASAdd) across 2 other UserForms(frmIngrPrices and frmSizePrices) both secondary UserForms triggered using the same command button in UserForm (frmSizesASAdd)?
Please assist. Thanks.