Thread: Fill cells
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default Fill cells

I have the following VBA. BUt I would like to know how to make that when
right clicking it should not go less then zero. If I right click on a 1 then
it should turn empty.

"Dan R." wrote:

Not sure if this is what you need or not but right-click the tab of
the sheet, hit View Code and paste this in the

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
Target = Target.Value + 1
End Sub

--
Dan


On Sep 9, 2:05 pm, art wrote:
Hello:

Is there a way that I can make through anyway (macro, VBA) that when I
select a cell, it should automatically fill in the number 1. and If I select
the cell twice the cell should fill in the number 2. Any help would be
appriciated.