I am using a selection_change event on a worksheet to launch a userform that will populate the cell when a selection is made from a drop down list box on the form. Selection_change shows form if cell to the left of the active cell meets a certain condition and the active cell is in column 8.
Problem: when conditions warrant, selection_change shows userform. when executed Excel locks. VBA editor indicates code is running but form can not be seen.
Some Details: This is a very large spreadsheet with lots of formating in the cells, borders, etc. Sheets are protected to select unlocked cells, edit objects, edit senarios, insert hyperlinks. worksheets contain several command buttons and a calendar 11.0 control. Worksheet only navigable using controls and forms, Hidden items: AllToolbars, some right click menu items, sheet tabs, horizontal scroll bar. All sheets set to same zoom level(80%). forms are launched so as not to be atop other controls. all sheets reached by controls contain activate, change, and selection_change events.
Contents:
worksheets: 34
named ranges:45
userforms:24 (all modal)
modules:11
Using Excel2003 on XP pro >2gig Ram
Problematic code:
If CCol = 8 And UCase(Cells(CRow, "E").Value) = "X" Then
If ActiveCell.Value <> "" Then
resp = MsgBox("Do you want to replace " & ActiveCell.Value & " as the responsible party" & vbCr & "to complete Task" & ActiveCell.Row & "?", vbYesNo)
If resp = vbYes Then GoTo showit
If resp = vbNo Then GoTo dont
End If
showit:
With UserForm3.Label1
.Caption = "Assign a resource to complete task " & ActiveCell.Row & "."
End With
With UserForm3
.Left = ActiveCell.Left + 35
.Top = ActiveCell.Top
.Show '<-----code and excel locks on this instruction
End With
dont:
changeflag = False
Any ideas please? This has driven me nuts. The real kicker is that the code works on a different sheet. I have written the code to be able to copy from sheet to sheet without need of change.