View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] Spencer.Sadkin@gmail.com is offline
external usenet poster
 
Posts: 42
Default Weird Happenings

I have an application with a bunch of dropdown controls and buttons
that run macros.

In a particular instance if i reset dropdown 1 to "New" it then sets
dropdown 2 to "New"

The issue is, that when the second dropdown2_change event runs a
different sheet in the workbook appears to be activated (though it
should not), on a closer look the sheet was not activated as the tab
for the original sheet is still selected, however now the 2nd sheets
information is displayed. But if i then click a different tab and
then click back everything looks normal (so the data did not get
written over)

Hopefully this example clears it up:

Adding the following code to the dropdown2_change fixes the issue but
its sloppy sloppy programming

Sub dropdown2_change()
'code happens
sheets("anothersheetinworkbook").activate
sheets("mainsheet").actiavte
End Sub

This is the one that produces the weird thing:

Sub dropdown2_change()
'code happens
sheets("anothersheetinworkbook").activate
sheets("mainsheet").actiavte
End Sub

Any ideas?