Before opening your workbook, you will need to verify if the workbook exists or not, so that it won’t return error or the VBA will stop improperly.
If the workbook exists, it will return “TRUE“.
If the workbook doesn’t exist, it will return “FALSE“.
Function DoesWorkBookExist(ByVal wbPath As String, ByVal WBName As String) As Boolean
Dim i As Integer
Dim FileCheck As String
FileCheck = wbPath & “\” & WBName
If Dir(FileCheck) <> “” Then
‘MsgBox (“Workbook – ” & wbName & ” exists”)
DoesWorkBookExist = True
‘MsgBox (“Workbook – ” & wbName & ” doesn’t exist”)
DoesWorkBookExist = False
Themed “Blossoms of Love”, the Hong Kong Flower Show 2017 showcases the rose as its spotlight flower and Hong Kong as a beautiful city of love. The installation will combine lighting effects, 3D effects and multi-media.
Date: 16 Mar 2017
It is a subroutine and can be executed directly via the Macro list. The function is to modify delimited text into separate columns, so you can manipulate data better and easily.
objRange1 is the definition of the range within a worksheet, you can specify.
Destination:=Range(“A3”) is the location where the output will be appeared, you can specify.
Dim objRange1 As Range
‘Set up the ranges
Set objRange1 = Range(“A1:A20”)
‘Do the first parse
It is the entrance of the Hong Kong Flower Show 2017, the logo comes with different color LED, please come and visit the show in Victoria Park, Causeway Bay…
The Hong Kong Flower Show is a major event organised by the Leisure and Cultural Services Department to promote horticulture and the awareness of greening. Every year, it provides a good opportunity for hundreds of thousands of local citizens and horticulture lovers all over the world to appreciate the beauty of flowers and share their experiences in the cultivation of flowers. Hong Kong Flower Show 2017 will be held from 10 to 19 March 2017 at Victoria Park in Causeway Bay. With “Blossoms of Love” and the adorable “Rose” as its theme and theme flower respectively, the Hong Kong Flower Show 2017 will project Hong Kong as a beautiful city where love is in the air. Featuring “Rose” as its theme flower, the event will showcase this exquisite plant and a rich profusion of exquisite potted plants, beautiful floral arrangements and gorgeous landscape displays by organizations from local, the Mainland and overseas. There will also be commercial stalls selling flowers and other horticultural products.
Date: 13 Mar 2017
It is quite simple to insert Emoji and Symbols in Mac OS, you can find the Emoji & Symbols almost in any applications on Mac, select from menu and choose your desired Emoji icons or symbols, then double-click or drag-n-drop it to your application(s).
Do you know the simple method to capture your screen in Mac OS?
Click to System Preferences > Keyboard > Shortcuts > Screen Shots, and you will find the shortcut keys to perform different style of screen captures,
– Save picture directly or copy picture to clipboard with your whole screen
– Save picture directly or copy picture to clipboard with your selected areas
^ means <alt/option> key
Chinese Lion Dance in Hunghom, Hong Kong, this is celebration to surrounding shops, restaurants, and wish them good luck and good business.
Date: 11 Mar 2017
You can create your own User-Defined Type in VBA, which you can group the common variables in this type “RowColumn”.
In this “RowColumn” variable, it will contain Row, Column Number, Column Letter and the Address (range reference for the specified range, this can speed up in calculation).
Now you will be able to define your own “RowColumn” as variable,
e.g. Dim infoRowColumn As RowColumn
Public Type RowColumn
xRow As Long
xColumn As Integer
xColumnName As String
xAddress As String
This is a function, to check if your workbook is opened or not opened. If the workbook is opened, it will return the “True” value for further work; if the workbook is not opened, it will return “False”. You can perform some basic file operation and validation when working with multiple workbooks or Excel spreadsheets.
Function IsWorkBookOpen(ByVal WBName As String) As Boolean
Dim WBook As Workbook
On Error Resume Next
Set WBook = Workbooks(WBName)
If WBook Is Nothing Then ‘Not open
‘MsgBox wbName & “Workbook is not open”, vbCritical
Set WBook = Nothing
IsWorkBookOpen = False
Else ‘It is open
‘MsgBox wbName & ” is open”, vbInformation
Set WBook = Nothing
IsWorkBookOpen = True
Visual Basic for Application (VBA), is an event-driven programming by Microsoft, the original programming is based on Visual Basic 6, which is an Integrated Development Environment (IDE).
It begins in Microsoft Office 97 and allows users to create automation via Macro recorder or VBA programming; this is a simple straight forward Basic style programming language and replace the older scripts in older Office 95 or earlier.
The VBA had been upgraded to version 7 in Microsoft Office 2010, and it provides more functions and options to perform automation in Microsoft Office – Word, Excel, PowerPoint, Visio, Project and Access. Since Microsoft Office 2011 for Mac, VBA had been re-added, Mac users can also enjoy the same automation, but with limited developer interface than in Office on Windows platform, i.e. the path will be different in Mac, to use “:” as the directory.
Automation in Microsoft Office application is an important feature, that can help users to reduce tedious, repeatable tasks when working in Office applications, in addition, to reduce human errors in handling large amount of data. However, this VBA can only work within the Office Applications environment.