Hong Kong Flower Show 2017…

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

Advertisements

Mac – How to capture your screen?

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

Screenshots shortcuts

Chinese Lion Dance for shops… 紅磡紅青堂醒獅賀商舖

https://www.facebook.com/儒釋道三聖寶林紅青堂-126064110806119

Chinese Lion Dance in Hunghom, Hong Kong, this is celebration to surrounding shops, restaurants, and wish them good luck and good business.

by 紅青堂醒獅

在香港,舞獅又稱醒獅,逢年過節,如天后誕辰,或是店鋪開業,都有醒獅表演的傳統。

醒獅被認為是驅邪避害的吉祥瑞物,每逢節慶,或有重大活動,必有醒獅助興,長盛不衰,歷代相傳。

Date: 11 Mar 2017

Excel VBA – How to create User-Defined Type…

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

Option Explicit

Public Type RowColumn
xRow As Long
xColumn As Integer
xColumnName As String
xAddress As String
End Type

Excel VBA – Check if Workbook is opened?

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
End If

End Function

VBA – Visual Basic for Application

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.

Excel VBA – How to convert Column Number into Column Letter?

This is a function, to convert the Column in number into the Column Letter, in order to work with most Range, functions in VBA, the Column Letter will be very useful than the Column number.

e.g. Column “A” = Column number 1

Column “C” = Column number 3

Function ConvertToLetter(ByVal iCol As Integer) As String

If iCol <= 26 Then
‘ Columns A-Z
ConvertToLetter = Chr(iCol + 64)
End If

If iCol > 26 Then
‘ Column label greater than Z, going into AA…
ConvertToLetter = Chr(Int((iCol – 1) / 26) + 64) & Chr(((iCol – 1) Mod 26) + 65)
End If

End Function

Excel VBA – How to find out workbooks’ path or location?

This is a custom function in Excel VBA, where you can find out the path or location of your workbook; it returns the information as a text output and you can make use of this for further programming,

Function DetectPath(ByVal WBName As String) As String
DetectPath = Workbooks(WBName).Path

End Function

Excel VBA – How to delete entire row(s)?

This is a custom function, to delete certain row(s) based on your specified Column and Row, then choose to delete the subsequent rows together in one go.

Function DeleteRows(ByVal validColumn As String, ByVal StartRow As Long, ByVal NumOfRows As Long)

Dim i As Long
Dim DelString As String

DelString = validColumn & StartRow & “:” & validColumn & NumOfRows

Range(DelString).EntireRow.Delete

End Function

e.g.
OpenResult = DeleteRows(“A”, 1, 9)