View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Virtanis[_3_] Virtanis[_3_] is offline
external usenet poster
 
Posts: 1
Default Macro Button To Modify A Cell's Contents?


Yeah, I see the problem with the target cells being all over the sheet
:(

My next thought would have been to modify the macro to know th
location of the actual target cell by pulling that cell locatio
(Column/Row) from the current sheet.

Well, after an elaborate series of walkarounds, I was able to pin down
in a cell on my summary page, the variable location of the target cel
that will be the subject of the "-1" adjustments. As I change my data
this cell constantly updates that location.

So now, what I was trying to figure out is something along these line
(forgive the novice pseudo-code).

Public Sub Button3_Click()
LocationXY = Cell D3 on the summary sheet2 'which has the real locatio
of the moving target cell on sheet1
With Sheets("Sheet1").Range("LocationXY")
.Value = .Value - 1
End With
End Sub

Geez... I feel like I'm trying to kill a fly with a shotgun. :)


--
Message posted from http://www.ExcelForum.com