Free Microsoft Excel 2013 Quick Reference

How to auto run vb macro when the excel file is open

This is the time macro that i need to run automatically...

CODE Here:

Dim TimerActive As Boolean
Sub StartTimer()
Start_Timer
End Sub
Private Sub Start_Timer()
TimerActive = True
Application.OnTime Now() + TimeValue("00:00:01"), "Timer"
End Sub
Private Sub Stop_Timer()
TimerActive = False
End Sub
Private Sub Timer()
If TimerActive Then
ActiveSheet.Cells(2, 2).Value = Time
Application.OnTime Now() + TimeValue("00:00:01"), "Timer"
End If
End Sub

The Problem im having is that i need this macro to run once the file is open, and keep the correct current time. and also would like to confirm if this macro would still function when i save the excel file as a web page using excel's save as option.

Your help with this will be highly appreciated.

Thanks.


Post your answer or comment

comments powered by Disqus
How do i get use macros when the excel doc. is password protected?? can some answer me please.. :D

how do u run a macro when a particular field is changed?

pls help!

Hi All

Is there a good way to test if the excel file hasn't been changed since it
was last saved?

We thought about computing the hashvalue but we noticed that when the excel
file is opened and closed without changing anything it changes its last
access date/time and also something inside the datastructure of the file.
that destroyes our hashvalue theory...

thanks for your help.

Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad

Dear all,

I would like to know if it is possible to prompt the user to enter a
password when an Excel file is open. Is it possible to do this in programming
level?
Thanks a lot!

Ivan

Hello Excel professionals,
I have a sheet and a macro that I want that macro auto run when that sheet
is in active. I looked in Help for AutoRunMacro, but I don't know how to do
for this macro. My macro is just to change color in a correct cell when it
reads value from another cell that is like for example: $E$14. The cells to
be changed color are different, but each time is just one cell. Only one
cell is changed color. How do I do? Thank you in advance.
Tvnguye

Is there a code, to auto run a macro?

I would like to run a macro, at 3am, every morning.

I have this macro that takes forever to run and it overwrites an existing spreadsheet. I need to run it, when people are not in the spreadsheets.

in a excel file, how to make a menu item for the .xls file that when clicked
on it runs myform.show? example plz

Example is on:
http://www.geocities.com/smplprgrsrc/files/menuDemo.zip

"Daniel" <softwareengineer98037@yahoo.com> schreef in bericht
news:uYJ$iJogFHA.2852@TK2MSFTNGP15.phx.gbl...
> in a excel file, how to make a menu item for the .xls file that when
> clicked
> on it runs myform.show? example plz
>
>

Hi, good morning.

I would like to know how to Auto highlight Cell A when Cell B is input a "Completed" or "Comp" or "Compl" etc value. Can I define a "Com*.*" value in the Conditional Fomartting?

Thanks

Is it possible to run a macro when the 'Enter' key is pressed? I know you can assign shortcut keys, but they usually involve some combination of 'Ctrl' + a key.

I have a form made, and would like to execute the macro when just 'Enter' is pressed.

Thank you.

Hello,
After I created an Add-in with custom functions and macros
I can sea and use the functions but the macros are not available.
I sea(Alt-F8) only the macros that are in the personal file.

How to make add-in macros available from Excel(Alt-F8) and
not only from VBA editor?

Any help/advice would be much appreciated

Ilia

I am running Microst Excel 2003 through Microsoft Front Page as I need to update to my website. I am using a shared network so my colleagues can also upload their web pages.

I want to run Excel through Front Page (web server) and AFTER I save the workbook I want to run a macro which saves the same file in a 'shared drive'.

Any ideas what code to use? And why does excel not remember this macro each time the excel file is opened through front page?

Thanks

Hi I would like to know if there is a command to deselect "allow cells drag
and drop" check box, and how to integrate it on to a macro every time a file
is open.

I have an Excel file that connects to an Access database through an odbc
connection on the user's machine. A new user is trying to run this file and
I need to set up an odbc datasource on his machine. The problem is that I
don't know what the excel file is expecting the name of the datasource to
be. I get the standard "Data source name not found and no default driver
specified" when I try to refresh the report data. Can I get the Excel file
to tell me what the name of the datasource is?

Thanks,
Walter

macro to find if the Excel file is using by other user and show
the user name?

Hello there,

I'm having a problem on images that's generated from excel. I'm using the
url method to generate the excel file and I'm aware that the images are
stored in a physical location and the images won't be able to be displayed if
the physical file is not available.

I'm able to display the images out when the excel report is generated;
however, when we save it as the default xls extension file, and open it in
another location, the images are not displayed, as only the physical file
path is being stored in the excel file. I've tested it on a couple of xls
extension type, and the one (excel 95 or older) of them save the images
together with the xls file.

Is there a way to store the images in the excel file? I'm currently using
the tag at the moment and do not wish to use any VBA in it.

If there's no way to do it, is there a way to make the default "save as
extension" to excel 95 ?

Hope you can understand what I'm saying here =)

Thanks,

Kevin

Hi, this problem is really frustrating me so if you can help I would really
appreciate it.

I am using Word 2003 and Excel 2003 to do a mailmerge and I am having a
problem with today’s date being inserted in the Word document when the Excel
value is zero. I would either like to show the date that is entered in the
Excel sheet or nothing if the Excel value is zero.

My entry in the Word document is:
{IF{MERGEFIELD E_Start} = 0 "" {MERGEFIELD E_Start @ "d MMMM yyyy}

Where am I going wrong?

Many thanks
David Hall

As I try to open some excel files I get a msg "The workbook you opened
contains automatic links to information in another workbook. Do you want to
update this workbook with changes made to the other workbook?". Is there any
way to bypass the msg successfully; i.e, not leading to further msgs? Like,
if you go to tools/options/edit and tick "ask to update automatic links"
option off, that msg does not pop up but a lot more other missing files
related msgs are generated. I cannot trap the msg as it fires even before the
Workbook_open() fires. I've tried to use sendkeys also, but it was not able
to solve the problem.
Thanx ...

Hello,

Every time any Excel file is opened, I'd like Excel to automatically
check the size of the file being opened and if it is greater than say,
5mb, I'd like Manual calculate to be turned on. Is there a way to do
this?

The workbook_open event etc. wouldn't work since then I would have to
include this macro in every single Excel workbook I ever create or that
already exists. Having the macro in the xlstart folder etc. doesn't
work either since the macro there doesn't seem to be run before the
file is opened.

Is there a way to do this using VBA? or VB6? or at the command line?

Thanks,

Hi Guys,
I trying to write a VBA that when the excel file is open it will prompt a box for the user to imput the ID then start date then finish date.
It will then look for the customer ID in a list I have (over 500 codes) and if the field to the right of the code is already used, then VBA has to insert a row right below the last row of the same code and input the values, typed in the box.
Obviously the average column will have to be updated to include the newly inserted rows of such a customer.
I have attached a file similar to the one I am using so it is easier for somebody to understand.

Thank you!

I am creating a user data entry spreadsheet in excel and I want to record the
date in a specific field when the excel file is opened. I need the field
"Submit Date" to be automatically populated and protected when a user opens
the file and performs a save. If the user does not Save the file the date
field should remain empty. Can anyone help with this please?

hi Guys,

can anyone let me know how to default a footer message on every excel
workbook i open so that i dont have to custom it every time.

why does a formula only work when the linked spreadsheet is open


No luck finding an answer? You could always try Google.