Sunday, December 26, 2010

17 ways to Optimize VBA Code for FASTER Macros

Here is a summary of the article:
1. Analyze the Logic
2. Turn off ScreenUpdating
3. Turn off 'Automatic Calculations'
4. Disable Events
5. Hide Page breaks
6. Use 'WITH' statement
7. Use vbNullString instead of ""
8. Release memory of Object variables
9. Reduce the number of lines using colon(:)
10. Prefer constants
11. Avoid Unnecessary Copy and Paste
12. Clear the Clipboard after Paste
13. Avoid 'Macro Recorder' style code.
14. Use 'For Each' than 'Indexed For'
15. Use 'Early Binding' rather 'Late Binding'
16. Avoid using Variant
17. Use Worksheet Functions wherever applicable

Do read full article to understand the logic behind them.

Sunday, October 24, 2010

Info Function

Info function provides information about the operating environment of the computer.

=INFO(name of the item you require information about)

Example :-

1. Current directory --> =INFO("directory")
2. Available bytes of memory --> =INFO("memavail")
3. Memory in use --> =INFO("memused")
4. Total bytes of memory --> =INFO("totmem")
5. Number of active worksheets --> =INFO("numfile")
6. Cell currently in the top left of the window --> =INFO("origin")
7. Operating system --> =INFO("osversion")
8. Recalculation mode --> =INFO("recalc")
9. Excel version --> =INFO("release")
10. Name of system. (PC or Mac) --> =INFO("system")

The results will be shown as text or a number depending upon what was requested.

Isn't it interesting, If yes, share with Your frenzz now :)

Tuesday, June 29, 2010

Hiding Formulas

There are times when you don't want the user to know the logic of the formulas or you want to maintain the confidentiality of formulas.

In this case, you want to hide the formulas from the users and display value only.

Follow the below steps to hide the formulas displayed in cell or Formula Bar.

1) Select the cells containing the formulas and need protection.
2) Right click ----> Format Cells.
3) Go to Protection Tab
4) Select LOCKED and HIDDEN CheckBox. (Locked check box restricts editing of cell)
5) Click OK
6) Go to Review tab
7) Click on "Protect Sheet" button
8) Apply password if required. ( Not mandatory)
9) Click OK.

To show the formulas again, Just use UNPROTECT SHEET button from Review Tab...
Locking cells or hiding formulas has no effect until you protect the worksheet.

Hope it helps....Share with your colleagues.

Saturday, June 26, 2010

Expand menus in excel 2003

In a new installation of Microsoft Excel 2003 all menus are abbreviated. To see a full menu requires that you either click the expand button at the bottom of the menu or wait about 3 seconds for it to automatically expand. To put it nicely, this drives me batty.

It’s a simple thing to show full menus in Excel 2003. There are several ways to make this change, but I’ll show the easiest method for me.

  1. Click the Tools menu OR right-click the toolbar
  2. Select Customize from the pop-up menu
  3. Select the Options tab in the Customize box
  4. Under Personalized Menus and Toolbars, click Always show full menus
  5. Click Close

Full menus always look the same, which makes it easier to find what you’re looking for and is a much better option for new users.

Friday, June 25, 2010

MS office Application Shortcuts

To open any office application , you may use Run command in start menu.

Go to Start , Select RUN

and type

1) excel to open MS Excel
2) winword to open MS Word
3) msaccess to open MS Access
4) outlook to open MS Outlook
5) powerpnt to open MS Powerpoint

Amazing ??

Start using now.................