Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
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
|
|||
|
|||
How to popup msgbox in this
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
|
|||
|
|||
How to popup msgbox in this
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
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. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
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 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to popup msgbox in this
Hi vumian,
vumian wrote: 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. Your code should work - it does for me. For a workbook that has been saved before, you should always use .xls at the end of the filename when you're checking to see if it's part of the active Workbooks collection. So if you have a workbook named filename.xls that you want to check for, you would use gbIsWBOpen("filename.xls"), which will return True if the workbook is open and False if it's not. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |