• Home
  • Blog
  • Resume
  • Contact
  • Projects
  • Gallery
  • Amit’s Resume
  • About Nagpur
KEEP IN TOUCH

Isworksheetopen and Isworkbookopen functions

Feb23
2005
1 Comment Written by admin

Here’s a IsWorkbookOpen function to check if a workbook is open or not. Returns TRUE or FALSE

Public Function IsWorkbookOpen(ByVal wkbkname As String) As Boolean
Dim Wb As Workbook
‘check if its already opened in the Windows collection
For Each Wb In Workbooks
If Wb.Name = wkbkname Then IsWorkbookOpen = True
GoTo exitsub
End If
Next Wb
exitsub:
End Sub

Here’s a IsWorksheetOpen function to check if a worksheet is open or not. Returns TRUE or FALSE

Public Function IsWorksheetOpen(ByVal wsname As String) As Boolean
Dim wk As Worksheet
For Each wk In Worksheets
If wk.Name = wsname Then
IsWorksheetOpen = True
GoTo exitsub
End If
Next wk
exitsub:
End Function

Related posts:

  1. Change the creation date of a workbook
  2. Excel Function to check if text is palindrome or not
Posted in Uncategorized - Tagged excel, UDF, VBA
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
« Change the creation date of a workbook
» How to loop through a list of data on a worksheet by using macros in Excel

1 Comment

  1. Antho765432's Gravatar Antho765432
    May 31, 2009 at 4:13 pm | Permalink

    that worked

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Tags

Access Alt F8 Books boxplot cells charts count cursor dashboard data mining dbase design error excel excel functions export filter flip LaTex MS query Number Err ODBC pipes Press Alt F11 Public Sub python R random numbers Range Cells report scripting software sparklines SQL SQL server stack columns statistics stemming string tag cloud text mining UDF VBA visualization wildcard

Network

View Ashutosh Nandeshwar's profile on LinkedIn

Recent Comments

  • larry on Access Export to Excel (2007)
  • Betty Chou on Projects
  • Rwill on Access Export to Excel (2007)
  • Bharathi on The search key was not found in any record in Access
  • Michael on The search key was not found in any record in Access

Related Posts

  1. Change the creation date of a workbook
  2. Excel Function to check if text is palindrome or not

EvoLve theme by Blogatize  •  Powered by WordPress nandeshwar.info