Hey guys,
I'm creating a user form with some buttons, currently i have:
Initialize label with name:
Sub UserForm_Initialize(populatingArray() As Variant, positionOfOverWrite As Integer)
Dim UserForm As Variant
UserForm.Caption = "Data found!"
Call UserFormCaption(populatingArray(), positionOfOverWrite)
End Sub
Caption the rest of the labels:
Sub UserFormCaption(populatingArray() As Variant, positionOfOverWrite As Integer)
LabelOverWriteDescription.Caption = ("Overwriting data at workbook:'" + CStr(populatingArray(positionOfOverWrite, 4)) + "', sheet: '" + CStr(populatingArray(positionOfOverWrite, 5)) + "' cell: row " + CStr(variableInQuestionRow) + ":column " + CStr(variableInQuestionColumn))
CommandButtonOverWriteOne.Caption = "Overwrite this"
CommandButtonOverWriteAll.Caption = "Overwrite all"
CommandButtonOverWriteCancel.Caption = "Cancel"
End Sub
Now when I try to initialize the with a function that carries over the array:
Call UserForm_Initialize(populatingArray(positionOfOverWrite, 4), i)
I get the error that no function or sub defined
Only way i found to open the form:
UserFormOverWrite.Show vbModeless
But with this function i do not move over my array
Why doesn't my module see the subs defined in the form? Is there some other way i need to initialize the user form?
I'm creating a user form with some buttons, currently i have:
Initialize label with name:
Sub UserForm_Initialize(populatingArray() As Variant, positionOfOverWrite As Integer)
Dim UserForm As Variant
UserForm.Caption = "Data found!"
Call UserFormCaption(populatingArray(), positionOfOverWrite)
End Sub
Caption the rest of the labels:
Sub UserFormCaption(populatingArray() As Variant, positionOfOverWrite As Integer)
LabelOverWriteDescription.Caption = ("Overwriting data at workbook:'" + CStr(populatingArray(positionOfOverWrite, 4)) + "', sheet: '" + CStr(populatingArray(positionOfOverWrite, 5)) + "' cell: row " + CStr(variableInQuestionRow) + ":column " + CStr(variableInQuestionColumn))
CommandButtonOverWriteOne.Caption = "Overwrite this"
CommandButtonOverWriteAll.Caption = "Overwrite all"
CommandButtonOverWriteCancel.Caption = "Cancel"
End Sub
Now when I try to initialize the with a function that carries over the array:
Call UserForm_Initialize(populatingArray(positionOfOverWrite, 4), i)
I get the error that no function or sub defined
Only way i found to open the form:
UserFormOverWrite.Show vbModeless
But with this function i do not move over my array
Why doesn't my module see the subs defined in the form? Is there some other way i need to initialize the user form?