• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Allow editing directly in Cell

Dear Friends.

In my workbooks, I have a macro to select "A1" when I open one sheet.

On Error Resume Next
Wsh.Range("A1").Select

The thing is when I double click one linked cell (Formula example = sheet2!B4), instead of going to this cell (due to Allow editing...option deactivated), it goes to A1, due to the VBA.

So, my question is how can I have one exception in my code for the "allow directly..."option to work

Is it possible?

Thank you

Best Regards
 
Hi ,

One reason no one has responded so far may be that the information given is inadequate.

if you upload your workbook with the data and the code in it , you might get an answer faster.

Narayan
 
Sure.

The code is

Code:
Private Sub Workbook_SheetActivate(ByVal Wsh As Object)
Dim sh As Worksheet

On Error Resume Next
Wsh.Range("A1").Select

For Each sh In ActiveWorkbook.Worksheets
  sh.DisplayPageBreaks = True
Next sh

End Sub

My idea is to have an exception here that allows excel to go to the specific cell, after 2 times click - the "allow editing directly in cell" Feature - and not to the A1 cell

Something like "except if allow editing directly in cell is off"

;)

Thank you

Cellardoor


▬▬▬▬▬▬▬▬▬ Mod edit : thread closed as duplicate !
 
Back
Top