LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Setting print area depending on a cell value

I am very new to VBA programming; in fact it still hurts when I read some of
the code that is posted!
I have a worksheet (called Form99) that is populated by data entries
placed on another worksheet (called Data Entry).
On Form99 I have cell N2 that is loaded through a nested IF statements
(=IF('Data Entry'!$A$9="","",IF('Data Entry'!$A$26="","1",IF('Data
Entry'!$A$43="","2",IF('Data Entry'!$A$60="","3","4")))))
I want to insert a button that runs a print macro to the default printer;
the print area depending on the value in cell N2. Specifically,
if N2 <1 print nothing (no print area selected message)
if N2 = 1 print area is A1:Q36
if N2 = 2 print area is A1:Q72
if N2 = 3 print area is A1:Q108
if N2 = 4 print area is A1:Q144
Then reset print area to nothing
Thank you in advance for your help

--
Rick
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Area Setting RozBuds Excel Discussion (Misc queries) 3 February 19th 10 09:41 PM
Setting The Print-Area ? Robert11[_3_] New Users to Excel 2 May 31st 09 03:24 PM
Setting print area richzip Excel Discussion (Misc queries) 1 April 27th 08 08:10 AM
setting print area via VBA JulieD Excel Programming 9 August 25th 04 11:02 PM
SETTING PRINT AREA IN VBA Frankie[_2_] Excel Programming 6 June 24th 04 03:11 PM


All times are GMT +1. The time now is 10:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"