Thursday, November 5, 2009
The tool also provides network monitoring feature. It helps us to break down the files, so that we can speed up the web page loading.
By the way, it's an add-on to Firefox. You can just install it, and you can open the Firebug as a bar at the bottom of your browser, or even in a separate window.
Click here to download the free firebug.
Friday, October 23, 2009
I am working on the Excel file, for show and hide certain ranges based on the selection. Say if user selects “Yes”, then I show certain range. Otherwise, I’ll hide that range.
I do the coding in the Worksheet_Change event. I check if the target is the relevant cell/range, then only I perform the function accordingly.
But, this is hardcoded, whenever the cell address has been changed, say insert a new row or remove a row, then I21 is no longer the cell I’m referring.
I just found a way to solve this “hardcode” problem – Define range name. But how can I check if the range name is my defined one? As I’ve tried Target.Address and Target.Name, both return me the cell address.
Finally, I’ve found this:
Range(Target.Address).Name.Name will return the defined range name. By using this, I do not need to hardcode the cell address anymore, and it saves lots of maintenance work in future. ^_^
Wednesday, October 21, 2009
I am doing an Excel task using Macro. I hide most of the worksheets at the start of the Excel file, until user did some selections to show/hide certain worksheets.
Now, I am asked to allow the users to unhide the hidden worksheets in the Excel file. I have searched around in the Excel file, but failed to get so. Then I realized, I have to change how I hide the worksheet in Macro codes.
This is how I used to hide worksheet:
Just change xlSheetVeryHidden to xlSheetHidden will do.
Using xlSheetVeryHidden can only unhide certain worksheets in Macro.
To unhide hidden worksheets:
1. Go to Format menu.
2. Click on Sheet, then Unhide.
3. You’ll get a list of hidden worksheets, just select the worksheet name and click on OK button to unhide it.
Sometimes when I built the application for Excel, I’ll need to convert the Column number to Letter (say, 3 is C) or vice versa.
I’ve been searching around, and finally found the following methods which are quite useful and simple. They cater for column letter like “AB” too.
Function: Convert column number to letter ( 2 –> “B”)
Function: Convert column letter to number (“B” –> 2)