A
Alessandro
Hi,
I'm passing a worksheet object to a sub but I get this error: "Type not
corresponding for argument ByRef" (message could be different in English
because translated from Italian, anyway this is the meaning).
This is the code calling Sub Checker, I don't know where the error could be
.... "objWorksheet" is a Worksheet object and also ByRef is the default.
//START
Private Sub Main
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
Checker objWorksheet, CDate(RangeForm.FromTextBox),
CDate(RangeForm.ToTextBox), "Bank", 6, 2, 3
End Sub
Private Sub Checker(objWorksheet As Worksheet, fromRange As Date, toRange As
Date, sheetName As String, codSpesaCol As Integer, dataCol As Integer,
spesaCol As Integer)
//do something
End Sub
//END
Do you have any idea about the problem ?
Many thanks in advance,
Best regards
Alessandro
I'm passing a worksheet object to a sub but I get this error: "Type not
corresponding for argument ByRef" (message could be different in English
because translated from Italian, anyway this is the meaning).
This is the code calling Sub Checker, I don't know where the error could be
.... "objWorksheet" is a Worksheet object and also ByRef is the default.
//START
Private Sub Main
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
Checker objWorksheet, CDate(RangeForm.FromTextBox),
CDate(RangeForm.ToTextBox), "Bank", 6, 2, 3
End Sub
Private Sub Checker(objWorksheet As Worksheet, fromRange As Date, toRange As
Date, sheetName As String, codSpesaCol As Integer, dataCol As Integer,
spesaCol As Integer)
//do something
End Sub
//END
Do you have any idea about the problem ?
Many thanks in advance,
Best regards
Alessandro