Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

tool bar button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vsn - 22 Jun 2007 14:38 GMT
Hi all,

Could someone tell me how I could assign a function which is loaded with an
add-in (*.xla) to a tool bar button. The function is to paste a date-time
stamp value. The idea is that the function will be always available, via the
tool bar button, in any workbook I do open.

I cant figure out how to do this, while in Word it is quit simple via the
"Normal.dot" template.

Thx, for any help on this one.

Ludovic
Gord Dibben - 22 Jun 2007 22:39 GMT
Here is the macro.

Sub NOWTIME()
   ActiveCell.Value = Format(Now(), "dd mmm yyyy h:mm:ss AM/PM")
End Sub

Store it in a module in a new workbook.

Assign it to a toolbar button which you get from Tools>Customize>Commands>Macros

Save the workbook as an add-in stored in Office\Libray folder.

Load the add-in through Tools>Add-ins and it will open each time Excel is
started.

NOTE: a static date/time can be entered by this method without a macro.........

CTRL + ;<space>CTRL + SHIFT + ;

Gord Dibben  MS Excel MVP

>Hi all,
>
[quoted text clipped - 9 lines]
>
>Ludovic
Vsn - 23 Jun 2007 16:20 GMT
Gord,

Thx for below advice it works fine.

I was however wondering if I could do it without the workbook? I mean having
the Macro in an module which sits in a XLA file?

Thx,
Ludovic

> Here is the macro.
>
[quoted text clipped - 34 lines]
>>
>>Ludovic
Gord Dibben - 23 Jun 2007 17:17 GMT
Re-read my original post.

That post gave instructions on how to place the macro in a new workbook which
you save as an add-in(*.xla)

Add-ins are nothing more than workbooks that have been saved as an *.xla file.

File>Save As>File Type>MS Excel Add-in(*.xla)

Gord

>Gord,
>
[quoted text clipped - 44 lines]
>>>
>>>Ludovic
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.