W
wbrowse
Hi,
I am learning VBA from ground 0. By the way is it a good idea? I don't
use a Mac but VBA support will not be available on Macs... How about
Pc?
As I am learning on my own, here is someh=thing I find a little
tricky:
Sub Order()
Dim UnitsOrdered, RemainingUnits As Integer
UnitsOrdered = 50
RemainingUnits = CheckAndUpdateStocks(UnitsOrdered)
blabla
blabla
End Sub
Function CheckAndUpdateStocks(UnitsOrdered As Integer)
blabla
blabla
End Function
When executing this, VBA tells me "Compile Error" & "ByRef argument
type mismatch"
Now if I go on modifying :
Function CheckAndUpdateStocks(UnitsOrdered As Integer)
as
Function CheckAndUpdateStocks(UnitsOrdered)
Then everything works fine. Why?
Thanks if you can help it out
Pcl
I am learning VBA from ground 0. By the way is it a good idea? I don't
use a Mac but VBA support will not be available on Macs... How about
Pc?
As I am learning on my own, here is someh=thing I find a little
tricky:
Sub Order()
Dim UnitsOrdered, RemainingUnits As Integer
UnitsOrdered = 50
RemainingUnits = CheckAndUpdateStocks(UnitsOrdered)
blabla
blabla
End Sub
Function CheckAndUpdateStocks(UnitsOrdered As Integer)
blabla
blabla
End Function
When executing this, VBA tells me "Compile Error" & "ByRef argument
type mismatch"
Now if I go on modifying :
Function CheckAndUpdateStocks(UnitsOrdered As Integer)
as
Function CheckAndUpdateStocks(UnitsOrdered)
Then everything works fine. Why?
Thanks if you can help it out
Pcl