About
Hi all, my name is Poer, I came from Indonesia, and this blog will be my online diary to keep and share all my problem and solution of course, that has a connection with Microsoft Excel VBA or Excel Macro.
Let see, I’m working as a computer programmer since 2002, mainly using Microsoft Visual Basic 6 at that time, but a lot of thing has happen since then. I grow up and already used many kind of programming language both desktop and web application, like Microsoft .NET and PHP with many kind of database server too.
Right know, I’m working at an Oil and Gas Company in Indonesia, and to be my surprise, they used Microsoft Excel VBA/Macro quite intensively in here. So here it goes, I launch this blog to share my Excel VBA/Macro experience for all of you out there.
Thanks for your visit.
Joshuacht
I’ve build a macro.
I want to refresh it every 15 minutes.
Is it possible to do this automatically?
Poer
Hi Joshua, honestly I never build one, but I think we can do it using GetTickCount API.
To make it work, I think we also need to use DoEvents in the loop and never change Application.ScreenUpdating value to false.
Kent
Use Application.OnTime to get the result you want.
check this code
http://unlimitedkent.com/excel/BlinkCell.xls
coincidently, i also work at a Oil & Gas company..nice to know u Poer
tjm
Can anyone send me some code that will automatically create a custom mennu (not tool bar) upoon opening a workbook and then strip that custom menu away upon closing. All I need the menu to do is to navigate to different tabs, (i.e. sheet1, sheet2, sheet3) and possibly run a macro.
Poer
thanks kent, nice to know you too
Poer
hi tjm, we can add a new CommandBar object to the CommandBars collections to create the menu. To make it automatically created upon opening a workbook, put the CommandBars.Add creation code on Workbook_Open event and simply remove the object from the collections upon workbook closing *call CommandBars.delete on Workbook_Close event*.
Lahari
Hi,
I have assigned a macro for a button and i need to run that in all the work sheets. Here when i clicked on the button the macro is running but only in the current sheet the control is not moving to other sheet.
Please help me in this. To detail
Sheet1 (the button is here where i assinged the macro)
When i clicked on it
Macro runs and executes only in sheet1
its not moving to sheet2.
I have used
‘For each wkst’
Please suggest me the correct way
flopenet
Buna
Ma bucur ca mai sunt persoane care au timp sa impartaseasca din experienta lor (in limba romana).
Sa traiasca.
Poer @ Excel VBA/Macro
Hi Lahari, try to put the macro on a module, not in Sheet1 code.