I have a spreadsheet, with different people using copies on different PC's. There is a macro triggered by Worksheet_Selection_Change that opens an image file. On two of the PC's, when the workbook is opened, the user can't edit a cell without double clicking in it. Also, the Selection_Change event is not triggered unless double clicked. In the options, "Allow Editing Directly in Cells" is checked. On my PC, this works fine, meaning I can edit cells.
We tried all the workarounds offered here: https://social.technet.microsoft.com/Forums/ie/en-US/b3f38d61-698a-4117-84a7-e73e3e209c25/excel-2013-unable-to-type-in-cell?forum=officeitpro
and here: https://www.mrexcel.com/forum/excel-questions/345218-cannot-enter-text-cell-unless-double-click.html
Some of these work, until an image was opened, then it was back to not allowing editing, and we had to restart the workbook.
It could be that something in the macro was causing this to happen, except I then erased all the code, made a hyperlink to the images (all the macro did was open images), and similar behavior would occur. You could edit cells, until you opened an image (using the hyperlink this time), and then you could not edit cells.
Furthermore, like I said on my computer this does not happen at all, and when we checked, same exact version of Windows, same exact version of Excel (14.0.7190.5000).
Is this just a random bug in Excel?
Am I missing something obvious?
It makes 0 sense to me why this would be happening on some PC's and not others.
Does anyone know how I can solve this?
Here is what I want to occur: User opens a spreadsheet. They can edit cells directly. User either:
A) Clicks a hyperlink directed to an image file which then opens on her computer.
or
B) Clicks a cell in the spreadsheet, which triggers the following code to run:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count = 1 Then
If Target.Column = 1 Then
Dim Shex As Object
Dim tgtFile As String
Dim fileName As String
fileName = Cells(Target.Row, Target.Column).Value & ".tif"
Set Shex = CreateObject("Shell.Application")
tgtFile = ThisWorkbook.Path & "\" & fileName
Shex.Open (tgtFile)
End If
End If
End Sub
Then after either A or B is completed, and the user has opened the image file, she can go back to the spreadsheet, and can still edit cells directly.
What is actually happening is the user is completing A or B, and then going back to the spreadsheet, and now all of a sudden can not edit cells directly. This only happens on some computers, not others, and all computers are on the same version of Windows and Excel.
Also, a copy of the spreadsheet can be found here: http://batesplus.com/temp/example.xlsm
How do I make it so that a user can open an image, and then go back to the spreadsheet, and still be able to edit cells?
Thank you