if i open normal.xltm he names itself normal1.xltm, a problem with code?

slaine06

New Member
Joined
Apr 14, 2009
Messages
8
Hello,
I have a problem:if i open normal.xltm he names itself normal1.xltm, a problem with code?
Code:
Application.Run "normal.xltm!Filename"
Application.CutCopyMode = False
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
ActiveWorkbook.FullName, TextToDisplay:= _
ActiveWorkbook.FullName

It's a template in \Xlstart, do i need to use a variable for the "normal.xltm", and what's the variable???
Thanks in advance,
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Are you sure it's not normal1.xlSm? Why are you using a template file rather than a workbook file?
 
Upvote 0
Hello,
Do you think if it matters if i use xlsm or xltm???

I'm new in this substance so i don't know, i thought i needed xltm for templates
 
Upvote 0
xltm is a template but why are you trying to run a macro from a template?
 
Upvote 0
Hello,
Thanks for checking this out, my boss asked me to make a normal with macro to use it when excel opens.
 
Upvote 0
I think you might want to get back to your boss and tell him there is no such thing as a 'normal' in Excel.:eek:

Now if we were talking Word there is the Normal.dot template.

What is it you are actually trying to do?:)
 
Upvote 0
I believe what you want is a Personal Macro Workbook. The easiest way to create one is to start to record a macro (you will need the Developer tab visible) and choose to save it in the Personal Macro Workbook, then just press Stop. This will create the workbook in the correct XLSTART directory. It will then load automatically when Excel starts (it will be hidden so you don't see it).
 
Upvote 0
Hello again...

My macro has to make a filename+path in a cell in excel and make a hyperlink of it and copy it to the clipboard ( to use it in outlook to paste the link), the macro works but now i want to put the file in a template that when i open excel i have my macro.
I hope that's clear for you???

Thanks, Slaine06
 
Upvote 0
See my last response. :)
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top