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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,806
Messages
5,638,472
Members
417,026
Latest member
UDK

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