code to print elsewhere

D

daniels012

What is the code I would need to send my form to be printed on anothe
network printer?

This is way beyond my knowledge so any help would be great.

Thank You,
Michae
 
D

daniels012

I used the "record macro" to do it. It works fine as long as I have
only that file open. How can I make it a macro for all excel
spreadsheets, not just the one I created the macro in??




Michael
 
D

dcronje

You can copy the macro into you personal.xls and create an icon on you
toolbar and assign the macroto i
 
D

Dave Peterson

personal.xls is used by lots of people to keep the general macros (and
functions) that they always want available when they start excel.

If you do Tools|Macro|Record new macro, one of the options to store the recorded
macro is in "personal macro workbook".

If you already have the code written, you can copy the procedure into the
project for personal.xls.

Then make sure you save this personal.xls into your XLStart folder.

In fact, many people want this workbook to open up hidden--just to avoid the
look of "clutter" of having multiple workbooks open--and it makes it more
difficult to close the workbook by mistake.

If you've created your personal.xls file, you can use this (inside Excel):
Make personal.xls the activeworkbook
then Window|Hide

Then close excel. You'll be prompted asking if you want to save personal.xls.
Answer yes.

Since you saved this file in your XLStart folder, it'll open each time you start
excel.

One way of finding that XLStart folder is:
Open excel
hit alt-f11 to see the VBE (where macros live)
hit ctrl-g to see the immediate window
type this and hit enter:
?application.startuppath

For me (xl2002 and win98), I get:
C:\WINDOWS\Application Data\Microsoft\Excel\XLSTART

Each time you add/change something in that personal.xls file, remember to back
up a copy to a nice safe location.

And if you a way to make your macros more accessible than Tools|macro|macros...

John Walkenbach has a nice workbook that actually creates another option on the
worksheet menubar.
http://j-walk.com/ss/excel/tips/tip53.htm

It's called menumaker. It's really simple to use and looks very
nice/professional.
 
G

Gord Dibben

Personal.xls is a Personal Macro Workbook which contains macros
available to all workbooks.

It is not a default workbook with the installation of Excel.

On menu go to Tools>Macro>Record New Macro.

You will be presented with a dialog box with Macro1 as name of macro. Below
that is "Store macro in". Select Personal Macro Workbook.

Record something simple like copying a cell and pasting. Stop Recording.
Close Excel and you will be asked if you want to save changes to Personal.xls

Click Yes. You now have a Personal.xls which will open each time you start
Excel. When it is open, you can go to Windows>Hide and make it hidden. Save
changes again. The macros you create will be available to work in all
workbooks.

Gord Dibben Excel MVP
 
Top