Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one way:
put this in a regular code module: Public Sub Button1_Click() With Sheets("Sheet1").Range("E2") .Value = .Value - 1 End With End Sub Note that using the With..End With is equivalent to Public Sub Button1_Click() Sheets("Sheet1").Range("E2").Value = _ Sheets("Sheet1").Range("E2").Value - 1 End Sub In article , Virtanis wrote: I'm just starting to look into VBA to help me do things with my excel project, but for the most part, I'm a beginner and totally stumped. Here is my problem. On Sheet2 I have a whole range of figures and numbers displayed which are pulled from a variety of other pages (say =Sheet1!E2 as an example). This is an overview page mostly. What I really need is to make a macro button next to a display field on sheet2 that, when pushed, will modify the the actual contents of the Sheet1!E2 cell by -1. Each push of that button will minus 1 from that cell indefinitely. I'm such a programming novice, I hope someone could take a moment of time to explain how to do this. Thank you very much. --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
link to a cell's contents | Excel Worksheet Functions | |||
link to a cell's contents | Excel Worksheet Functions | |||
link to a cell's contents | Excel Worksheet Functions | |||
link to a cell's contents | Excel Worksheet Functions | |||
Rotate a box with a cell's contents | Excel Discussion (Misc queries) |