Archive

Archive for March, 2005

To check if a workbook is open, if it’s not open it

March 3rd, 2005 No comments

This Procedure will ask for a file name to the user, will check if the file is open and if it’s not open it will open the file otherwise give a message to the user.

Public Sub IsWorkbookOpen()
Dim Wb As Workbook, wkbk As Variant
‘get the dialog box to open the file
wkbk = Application.GetOpenFilename(“Excel Files,*.xls”)
If wkbk = False Then Exit Sub
‘check if its already opened in the Windows collection
Dim flag As Boolean
flag = False
For Each Wb In Workbooks
If Wb.Path & “\” & Wb.Name = wkbk Then
MsgBox “File is already open”, vbExclamation, “Workbook Open”
Wb.Activate
flag = True
End If
Next Wb
If flag = False Then Workbooks.Open (wkbk)
End Sub
Categories: Uncategorized Tags:

Super-Easy Guide to the Microsoft Office Excel 2003 Object Model

March 1st, 2005 No comments

One more tutorial for VBA beginners. It’s really great, you’d be amazed by the power of VBA and it is very easy to learn. So why wait? start programming right now

Super-Easy Guide to the Microsoft Office Excel 2003 Object Model

Summary: Learn how easy it is to use the Excel object model to customize the way you work with Excel. Lessons include creating subroutines, the basics of objects, methods, and properties, and using dialog boxes. (29 printed pages)

Categories: Uncategorized Tags:

VBA Samples for Working with Excel 2003 Worksheets

March 1st, 2005 No comments
Categories: Uncategorized Tags: