Hi, I am using a worksheet where everytime I edit a cell when ever i hit enter it takes me back to the first cell A1 in the worksheet. The worksheet does have a Macro, and not sure if this is where I can fix the problem.
Hi, I am using a worksheet where everytime I edit a cell when ever i hit enter it takes me back to the first cell A1 in the worksheet. The worksheet does have a Macro, and not sure if this is where I can fix the problem.
Hi, welcome to the forum.
You are probably right about this macro. Specially if it is a Worksheet.Change() macro which is triggered every time you change something in that sheet.
Look into you VBEditor and to the sheet you have this issue and you should see the macro. It can be modified to prevent such behavior.
Pierre Leclerc
_______________________________________________________
If you like the help you got,
Click on the STAR "Add reputation" icon at the bottom.
Thanks for assisting. I had a look at the Macro but not sure what needs to be changed? Not sure if you can see.
Below is the Macro:
Sub Filter()
'
Application.ScreenUpdating = False
Application.CutCopyMode = False
Range("G2").Select
Selection.Copy
Range("G1").Select
ActiveSheet.Paste
Selection.AutoFilter Field:=10, Criteria1:="=*LS40*", Operator:=xlAnd
Range("G2").Select
ActiveCell.FormulaR1C1 = "S"
FinalRow = Cells(Rows.Count, 3).End(xlUp).Row
Range("G2").Select
Selection.Copy
Range("G2:G" & FinalRow).Select
ActiveSheet.Paste
Selection.AutoFilter Field:=10, Criteria1:="<>*LS40*", Operator:=xlAnd
Range("G2").Select
ActiveCell.FormulaR1C1 = "W"
FinalRow = Cells(Rows.Count, 3).End(xlUp).Row
Range("G2").Select
Selection.Copy
Range("G2:G" & FinalRow).Select
ActiveSheet.Paste
Range("G1").Select
Selection.Cut
Range("G2").Select
ActiveSheet.Paste
Selection.AutoFilter Field:=10
Range("G3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Interior.ColorIndex = xlNone
Selection.Font.Bold = False
Range("I9").Select
Application.ScreenUpdating = True
End Sub
First of all, you should look at rule #3 which will tell you how to insert QUOTE marks (# in the tools bar) to enclosed all the code you publish.
Now, It does not seems to be this macro as this one select the cell I9 at the end. If you are returned to cell A1, then you have another macro. Have you looked under the sheet or the ThisWorkbook section itself.
It will not be found in a module.
Mmm...not 100% sure where or how I can do this.
To make things easier I have attachd the file. if you wanted to take a quick squizz. Not sure if you can have a look. It is happening in the first worksheet. And sorry, it is returning to cell A3 not A1.
this is that macro causing you the problem.. You can see it by double-clicking on "Sheet1(Current Month Data)" in the VBEditor.
It means that every time a cell is changed in this sheet, this macro is activated. It return that selected cell to A3 and clear any comment it might have. You can certainly delete it without any issue.Please Login or Register to view this content.
Excellent. Thanks so much for your assistance and help. Worked just like you said.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks