SOLVED!PRINT & SAVE FILE AS CELL VALUE

ROBINSYN

Board Regular
Joined
Aug 19, 2002
Messages
188
Is there a way I can assign a macro to a button to print, print area set in sheet1.
Can I also do the same thing but assign the save file as feature using the values in two cells? IE: 3-60-001 is in cell a and vendor name in a2.

Really confused when it come to macros.
Appreciate all help.
This message was edited by ROBINSYN on 2002-09-07 07:08
This message was edited by ROBINSYN on 2002-10-27 18:16
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

XL-Dennis

Well-known Member
Joined
Jul 27, 2002
Messages
1,920
ROBINSYN,

Q1: Do You really need a macro for this?
- Select the area (cellrange) You want to print.
- Choose the command File | Print Area | Set Print Area.
- Print it out.

Q2: Save As
Following macro will save active workbook with the name from cell A1 and B1.<pre>
Sub SaveBook()
Dim rnCell1 As Range, rnCell2 As Range

'Your can replace the reference A1 with Your own.
Set rnCell1 = ThisWorkbook.Worksheets("Blad1").Range("A1")

'Your can replace the reference A1 with Your own.
Set rnCell2 = ThisWorkbook.Worksheets("Blad1").Range("B1")

ThisWorkbook.SaveAs Filename:=CStr(rnCell1.Value) & _ CStr(rnCell2.Value</pre>


Kind regards,
Dennis

Ps Hm, 400 replies....already???
This message was edited by XL-Dennis on 2002-09-07 08:52
 

ROBINSYN

Board Regular
Joined
Aug 19, 2002
Messages
188
No, I do not need a print macro. The people who will bw using this do. They are extremely new to computers and have a hard time with any icons or how to find the file menu. I just want to make this spreadsheet as friendly as possible.

Thanks for the macro to save the file. Works like a dream. Solves so many problems for me.
 

elgringo56

Well-known Member
Joined
Apr 15, 2002
Messages
869
Create a button using the drawing tool

Then, open the macro recorder and then go thru the steps of printing what you want to print, this will make the macro. Then right click on the button you made and select assign macro.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,613
Messages
5,838,378
Members
430,541
Latest member
Chopin1976

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
Top