spurs
Active Member
- Joined
- Oct 18, 2006
- Messages
- 479
- Office Version
- 2016
- 2013
- 2010
- 2007
- 2003 or older
- Platform
- Windows
Every time an entry is made on the worksheet "Geometry" the macro Every_Update runs
This is how the command is written in the Workbook_Open() event
Private Sub Workbook_Open()
Worksheets("Geometry").OnEntry = "Every_Update"
End Sub
This has worked well for years as Every_Update runs with every worksheet entry
I am trying to add a drop down selection onto the worksheet Geometry. There are 4 selections in the drop down list, A, B, C and D
When selecting from the drop down list, say "B" the macro Every_Update does not run. I suspect this is because when selecting from the drop down list, the entry key is not pressed on the computer keyboard and hence "Every_Update" does not run.
It is important to run Every_Update because the options A to D are intended to change formatting and formula entries in 3 or 4 cells in the worksheet Geometry. The formatting does not happen after the drop down list item is selected because enter is not pressed.
I want Every Update to run once the drop down list item is selected.
To do this in the worksheet module Geometry, i added the following code
Private Sub Worksheet_Change(ByVal Target As Range)
Every_Update
End Sub
This has proven to be a problem because it seems to get into an endless loop of updates
I assume that Every update runs as a result of the sub.workbook().open command and it also runs as a result of the worksheet module. It becomes an endless loop
I have two questions:
1) Is the best way to resolve this by keeping the sub workbook.open() approach and remove the worksheet coding? If i do this, how can i get the drop down list once selected to do an entry to run every update
2) Is it better to remove the sub workbook.open() function and leave the worksheet event ?
or is there another solution to prevent an endless loop
This is how the command is written in the Workbook_Open() event
Private Sub Workbook_Open()
Worksheets("Geometry").OnEntry = "Every_Update"
End Sub
This has worked well for years as Every_Update runs with every worksheet entry
I am trying to add a drop down selection onto the worksheet Geometry. There are 4 selections in the drop down list, A, B, C and D
When selecting from the drop down list, say "B" the macro Every_Update does not run. I suspect this is because when selecting from the drop down list, the entry key is not pressed on the computer keyboard and hence "Every_Update" does not run.
It is important to run Every_Update because the options A to D are intended to change formatting and formula entries in 3 or 4 cells in the worksheet Geometry. The formatting does not happen after the drop down list item is selected because enter is not pressed.
I want Every Update to run once the drop down list item is selected.
To do this in the worksheet module Geometry, i added the following code
Private Sub Worksheet_Change(ByVal Target As Range)
Every_Update
End Sub
This has proven to be a problem because it seems to get into an endless loop of updates
I assume that Every update runs as a result of the sub.workbook().open command and it also runs as a result of the worksheet module. It becomes an endless loop
I have two questions:
1) Is the best way to resolve this by keeping the sub workbook.open() approach and remove the worksheet coding? If i do this, how can i get the drop down list once selected to do an entry to run every update
2) Is it better to remove the sub workbook.open() function and leave the worksheet event ?
or is there another solution to prevent an endless loop