Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get the above stated compile error when I run the following code:
Dim myfile as String myfile = "Book1.xlsm" If Module1.IsWbOpen (myfile) Then ' Do stuff End If ------------------[ IsWbOpen() is in Module1]-------------------- Public Function IsWbOpen(WbName As String) As Boolean For Each wb In Application.Workbooks If wb.Name = WbName Then IsWbOpen = True Exit For End If Next End Function -------------------------------------------------------------------- Does anybody know what the heck is wrong here??? I know i am definitely passing a String variable into "IsWbOpen()", yet I am seeing a compile error. Thank you! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"ByRef argument type mismtach" on string variable *sometimes* | Excel Programming | |||
"Compile Error: ByRef argument type mismatch" when calling my function from another module | Excel Programming | |||
HELP "ByRef Argument Type Mismatch" | Excel Programming | |||
"ByRef argument type mismatch" Error | Excel Programming | |||
ByRef argument type mismatch error? | Excel Programming |