Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How to check any file active or not if window("file.abc").active = true then do function else msgbox "error" end if what's wrong with this ? thank you -- vumian ------------------------------------------------------------------------ vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494 View this thread: http://www.excelforum.com/showthread...hreadid=565232 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi vumian,
To check to see if a named workbook is currently open, you could use this function: Public Function gbIsWBOpen(rsName As String) As Boolean On Error Resume Next gbIsWBOpen = Len(Workbooks(rsName).Name) On Error GoTo 0 End Function -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] vumian wrote: How to check any file active or not if window("file.abc").active = true then do function else msgbox "error" end if what's wrong with this ? thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi Jake Marx, it's great man, thank you very much. Brgds, -- vumian ------------------------------------------------------------------------ vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494 View this thread: http://www.excelforum.com/showthread...hreadid=565232 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() it's has a little problem Public Function gbIsWBOpen(rsName As String) As Boolean On Error Resume Next gbIsWBOpen = Len(Workbooks(rsName).Name) On Error GoTo 0 End Function sub abc() if gbIsWBOpen("filename.doc")=true then do function else msgbox "error" end if What's wrong with this sub abc() ??? thanks your help. -- vumian ------------------------------------------------------------------------ vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494 View this thread: http://www.excelforum.com/showthread...hreadid=565232 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi vumian,
Are you looking for a file that may be open in another application (I see you're looking for a filename with extension "doc")? If so, this won't work. The function below only checks for Excel workbooks with the given name that are open. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] vumian wrote: it's has a little problem Public Function gbIsWBOpen(rsName As String) As Boolean On Error Resume Next gbIsWBOpen = Len(Workbooks(rsName).Name) On Error GoTo 0 End Function sub abc() if gbIsWBOpen("filename.doc")=true then do function else msgbox "error" end if What's wrong with this sub abc() ??? thanks your help. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi man, no man, i wrote above, it's just a example :)) atually, i'm not looking for a filename with extension "doc", just xls only but it has not worked so far , hixhix :( i wanna check if that file is not opened, how to msgbox for this ?? help me pls. -- vumian ------------------------------------------------------------------------ vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494 View this thread: http://www.excelforum.com/showthread...hreadid=565232 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi Jake Marx, it's great man, thank you very much. Brgds -- vumia ----------------------------------------------------------------------- vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649 View this thread: http://www.excelforum.com/showthread.php?threadid=56523 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi Jake Marx, it's great man, thank you very much. Brgds -- vumia ----------------------------------------------------------------------- vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649 View this thread: http://www.excelforum.com/showthread.php?threadid=56523 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to popup msg box ? | Excel Programming | |||
popup box | Excel Programming | |||
Popup MsgBox | Excel Discussion (Misc queries) | |||
Making a Msgbox popup | Excel Programming | |||
MsgBox Popup in Excel | Excel Programming |