Theory behind passing workbook
I got when it is creating problems, but why i don't know
Function func1(ByRef S1 As Workbook)
MsgBox "hi"
End Function
Sub ff()
Dim D As Workbook
Set D = Application.Workbooks.Open("C:\practice\D.xls")
Call func1(D)
End Sub
Sub ff1()
Dim D, S As Workbook
Set D = Application.Workbooks.Open("C:\practice\D.xls")
Call func1(D)
End Sub
when I call function "Func1" using sub ff1 then i am getting the error msg
"ByRef argument type mismatch"
|