Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with function
Hi.
I am using this call to a function to check if the workbook is open. In a number of forms this works correctly. In one form the function is not called. Looking in debug with a breakpoint on the first line the code then jumps to line three without going to the function. Can anyone suggest why this may be happening? If WorkbookIsOpen("Ongoing") = False Then Set wb = Workbooks.Open(ActiveWorkbook.Path & "\Ongoing") Else Set wb = Workbooks("Ongoing") Workbooks("Ongoing").Activate End If Thanks, Albert. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with function
Consider using:
http://www.cpearson.com/excel/IsFileOpen.aspx instead -- Gary''s Student - gsnu2007k "Albert Browne" wrote: Hi. I am using this call to a function to check if the workbook is open. In a number of forms this works correctly. In one form the function is not called. Looking in debug with a breakpoint on the first line the code then jumps to line three without going to the function. Can anyone suggest why this may be happening? If WorkbookIsOpen("Ongoing") = False Then Set wb = Workbooks.Open(ActiveWorkbook.Path & "\Ongoing") Else Set wb = Workbooks("Ongoing") Workbooks("Ongoing").Activate End If Thanks, Albert. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with function
try adding XLS. If a file has been saved you need the XLS.
If WorkbookIsOpen("Ongoing.xls") = False Then Set wb = Workbooks.Open(ActiveWorkbook.Path & "\Ongoing.xls") Else Set wb = Workbooks("Ongoing.xls") Workbooks("Ongoing.xls").Activate End If "Albert Browne" wrote: Hi. I am using this call to a function to check if the workbook is open. In a number of forms this works correctly. In one form the function is not called. Looking in debug with a breakpoint on the first line the code then jumps to line three without going to the function. Can anyone suggest why this may be happening? If WorkbookIsOpen("Ongoing") = False Then Set wb = Workbooks.Open(ActiveWorkbook.Path & "\Ongoing") Else Set wb = Workbooks("Ongoing") Workbooks("Ongoing").Activate End If Thanks, Albert. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Function Question: Collect Condition in Dialog Box - But How toInsert into Function Equation? | Excel Programming | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Need to open the Function Arguments window from VBA for a user defined function. | Excel Programming | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions |