Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Activation combobox problem.

I have (from the sheet toolbar: view - toolbars - VB)
placed some comboboxes on a sheet. I wrote this code to
fill the boxes when the workbook is opened. My problem is
that when I open the file, the combobox don't fire off. I
have tried worksheet activation(won't fire off), change
(when i click outside the combobox, selection disappears)
and selectionchange(same as last). When I create a form
and put in comboboxes and write similar code, it works in
the activation, but it will not work for combobox on a
sheet. There aren't to many choices for a worksheet so I
don't have a clue of what to do to make this code fire off
when I open this file. Can anybody tell me what I am
doing wrong? Please let me know what I can do to make
this code fire off when I open the file so the user can
make a selection.



Sub Worksheet_Activate()


Me.Location.AddItem "IC187"
Me.Location.AddItem "IC207"
Me.Location.AddItem "KYD20"
Me.Location.AddItem "KY889"
Me.Location.AddItem "KY400"
Me.Location.AddItem "IC461"


Me.ValPlan.AddItem ""
Me.ValPlan.AddItem "n/a"
Me.ValPlan.AddItem "To Techwriter for creation"
Me.ValPlan.AddItem "To Techwriter for revision"
Me.ValPlan.AddItem "To Validation Coordinator for review"
Me.ValPlan.AddItem "To CSQC for pre-approval"
Me.ValPlan.AddItem "To Validation Coordinator for signoff"
Me.ValPlan.AddItem "To System Custodian for signoff"
Me.ValPlan.AddItem "To System Owner for signoff"
Me.ValPlan.AddItem "To CSQC for signoff"
Me.ValPlan.AddItem "Lab working on it"
Me.ValPlan.AddItem "APPROVED"

.........

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Activation combobox problem.

Hi Chris

Worksheet_activate fires when you click the sheet tab after spending a great time in
another sheet within the same workbook. Workbook_open (in the ThisWorkbook module, explore
its possibilities) fires when the file is opened. To use that, move all code and replace
"Me" With "Sheets(1)" or wherever the thing resides.

As for userforms, you should imo use the Userform_Initialize event instead, it's the
"build me" event.

See Chip's page http://www.cpearson.com/excel/events.htm for a great list of events.
--
HTH. Best wishes Harald
Followup to newsgroup only please.

"chris" wrote in message
...
I have (from the sheet toolbar: view - toolbars - VB)
placed some comboboxes on a sheet. I wrote this code to
fill the boxes when the workbook is opened. My problem is
that when I open the file, the combobox don't fire off. I
have tried worksheet activation(won't fire off), change
(when i click outside the combobox, selection disappears)
and selectionchange(same as last). When I create a form
and put in comboboxes and write similar code, it works in
the activation, but it will not work for combobox on a
sheet. There aren't to many choices for a worksheet so I
don't have a clue of what to do to make this code fire off
when I open this file. Can anybody tell me what I am
doing wrong? Please let me know what I can do to make
this code fire off when I open the file so the user can
make a selection.



Sub Worksheet_Activate()


Me.Location.AddItem "IC187"
Me.Location.AddItem "IC207"
Me.Location.AddItem "KYD20"
Me.Location.AddItem "KY889"
Me.Location.AddItem "KY400"
Me.Location.AddItem "IC461"


Me.ValPlan.AddItem ""
Me.ValPlan.AddItem "n/a"
Me.ValPlan.AddItem "To Techwriter for creation"
Me.ValPlan.AddItem "To Techwriter for revision"
Me.ValPlan.AddItem "To Validation Coordinator for review"
Me.ValPlan.AddItem "To CSQC for pre-approval"
Me.ValPlan.AddItem "To Validation Coordinator for signoff"
Me.ValPlan.AddItem "To System Custodian for signoff"
Me.ValPlan.AddItem "To System Owner for signoff"
Me.ValPlan.AddItem "To CSQC for signoff"
Me.ValPlan.AddItem "Lab working on it"
Me.ValPlan.AddItem "APPROVED"

........



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox problem hoyos Excel Discussion (Misc queries) 4 December 10th 09 11:16 AM
Combobox problem in protected sheet Oguz Excel Discussion (Misc queries) 0 March 27th 08 11:26 AM
Problem Using Delete Key Because of Combobox Joseph Fletcher Excel Discussion (Misc queries) 11 February 23rd 07 01:45 PM
Excel combobox problem aoeui Excel Discussion (Misc queries) 2 August 25th 05 02:07 AM
ComboBox Problem Tressa Excel Programming 2 August 27th 03 08:58 PM


All times are GMT +1. The time now is 05:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"