#1   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default macro help please

Hi i'm using the following macro to print a range and add 1 to a cell what i
need it to do is add a number from a cell and then reset to 1, anyone help
please

Sub Button2_Click()
Sheets("Sheet1").Range("E10").Value = _
Sheets("Sheet1").Range("E10").Value + 1
ActiveSheet.Range("Y4:AA12").PrintOut preview:=False
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default macro help please

Sub Button2_Click()
With Sheets("Sheet1")
.Range("E10").Value = _
.Range("E10").Value + .Range("A1").Value
.Range("A1").Value = 1
End With
ActiveSheet.Range("Y4:AA12").PrintOut preview:=False
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Mike" wrote in message
...
Hi i'm using the following macro to print a range and add 1 to a cell what

i
need it to do is add a number from a cell and then reset to 1, anyone help
please

Sub Button2_Click()
Sheets("Sheet1").Range("E10").Value = _
Sheets("Sheet1").Range("E10").Value + 1
ActiveSheet.Range("Y4:AA12").PrintOut preview:=False
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default macro help please

Thanks Bob your always a great help, can you make it so it prints the number
before it resets it to 1 please

"Mike" wrote:

Hi i'm using the following macro to print a range and add 1 to a cell what i
need it to do is add a number from a cell and then reset to 1, anyone help
please

Sub Button2_Click()
Sheets("Sheet1").Range("E10").Value = _
Sheets("Sheet1").Range("E10").Value + 1
ActiveSheet.Range("Y4:AA12").PrintOut preview:=False
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default macro help please

Sub Button2_Click()
With Sheets("Sheet1")
.Range("E10").Value = _
.Range("E10").Value + .Range("A1").Value
ActiveSheet.Range("Y4:AA12").PrintOut preview:=False
.Range("A1").Value = 1
End With
End Sub


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Mike" wrote in message
...
Thanks Bob your always a great help, can you make it so it prints the

number
before it resets it to 1 please

"Mike" wrote:

Hi i'm using the following macro to print a range and add 1 to a cell

what i
need it to do is add a number from a cell and then reset to 1, anyone

help
please

Sub Button2_Click()
Sheets("Sheet1").Range("E10").Value = _
Sheets("Sheet1").Range("E10").Value + 1
ActiveSheet.Range("Y4:AA12").PrintOut preview:=False
End Sub



Reply
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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 01:50 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"