Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's not the doubleclicking that causes the trouble. It's what your code does.
But Bob answered that! SU123 wrote: Dave i have that in the code already, but the issue occurs when i want to add a new line. when adding the new line, it checks the bolean, but as i select the cells to copy and paste, it then tries to resize them (i.e. calls the 2nd procedure). is there a way to add a bolean to the worksheet_change routine, as that i believe would solve the issue. "Dave Peterson" wrote: If you've turned on "edit directly in the cell", then you'll be editing the cell after you doubleclick on that cell. If you hit the Escape key, then your second procedure doesn't fire, right? You can add a line to stop going into edit mode after the doubleclick. Option Explicit Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Cancel = True 'rest of code here End Sub SU123 wrote: i have two subroutines 1. on double click insert a line using Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 2. on enter resize cells (as some of my cells are merged and autofit does not work) - using rivate Sub Worksheet_Change(ByVal Target As Range) function. The issue i have is when calling function/sub 1, function/sub 2 is automatically activated and causes an error. is there a way that i can have function/sub one ignore function/sub 2. Thanx in advance -- Dave Peterson -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sub routine | Excel Discussion (Misc queries) | |||
VBA routine (101) | Excel Programming | |||
SUB ROUTINE | Excel Programming | |||
Routine?? | Excel Programming | |||
Need VBA Routine | Excel Programming |