To ALL Macro-Men,![Cool :cool: :cool:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
![Cool :cool: :cool:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Please allow myself to welcome in a New Regime of VBA!
Please help!!![Roll eyes :rolleyes: :rolleyes:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
My ultimate Goal
: To increase mouse clicked Cell value = previously mouseclicked cell value + 1 Range (A4:F57)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
Initially Cellvalue will be first data-entered cell by user(i.e. “A4” need user input box for this) (Perhaps I cannot eliminate this step as user should enter first value, say A4= "5000")<o
></o
>
Previously clicked cell canbe any random cell in the same Range (“A4:F57") <o
></o
>
So far I have code:<o
></o
>
At present I am using DoubleClickEvent to copy “A4” value first & then increase value by right click event…(Not a real solution!)<o
></o
>
Any other Best Solution ???
Please allow myself to welcome in a New Regime of VBA!
Please help!!
My ultimate Goal
Initially Cellvalue will be first data-entered cell by user(i.e. “A4” need user input box for this) (Perhaps I cannot eliminate this step as user should enter first value, say A4= "5000")<o
Previously clicked cell canbe any random cell in the same Range (“A4:F57") <o
So far I have code:<o
At present I am using DoubleClickEvent to copy “A4” value first & then increase value by right click event…(Not a real solution!)<o
Any other Best Solution ???
Code:
[SIZE=3][FONT=Times New Roman]Private SubWorksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] Target.Value = Range("A4").Value<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]If Target.Cells.Count >1 Then Exit Sub<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]If Not Intersect(Target,Range("myrange")) Is Nothing Then<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] Cancel = True <o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Target = Target + 1<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] End If<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]End Sub<o:p></o:p>[/FONT][/SIZE]
------------------------------------------------------------------------------------
[SIZE=3][FONT=Times New Roman]Private SubWorksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] If Target.Cells.Count > 1 Then Exit Sub<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] If NotIntersect(Target, Range("myrange")) Is Nothing Then<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] Cancel = True<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] Target = Target + 1<o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] End If <o:p></o:p>[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]End Sub<o:p></o:p>[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3][/CO[/SIZE][/FONT]DE]