LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Userform Not working PLEASE HELP

I have created a dialog box (NotSoFast) to pop up when my workbook is opened.
The dialog box has 4 comboboxes (Name, Center, Month, Week) each of which
I've created data for, and a button (Panic Switch) which captures the data.
My dialog box shows when the workbook is opened but there's no data in any of
my combobox lists. What is causing this? Below is my code:

Auto_open code
Private Sub Workbook_Open()
NotSoFast.Show
End Sub
---------------------------------------------------------
command button code
Private Sub PanicSwitch_Click()
MonthSelect = Month.Value
WeekSelect = Week.Value
NameSelect = Name.Value
CenterSelect = Center.Value
Cells(1, 1) = MonthSelect
Cells(2, 1) = WeekSelect
Cells(1, 2) = NameSelect
Cells(2, 2) = CenterSelect
Unload NotSoFast
End Sub
---------------------------------------------------------
module code for the comboboxes
Public NameSelect As String
Public CenterSelect As String
Public MonthSelect As String
Public WeekSelect As String

Sub ShowNotSoFast()
With NotSoFast.Name
.RowSource = ""
.AddItem "Bishop Minter"
.AddItem "Carlos Trespalacios"
.AddItem "Dennis Murphy"
.AddItem "Gary Hayden"
.AddItem "Gloria Montoya"
.AddItem "Lisa Muttillo"
.AddItem "Lorraine Warburton"
.AddItem "Warner Langlois"
End With
With NotSoFast.Center
.RowSource = ""
.AddItem "Bothell"
.AddItem "Collinsville"
.AddItem "El Paso"
.AddItem "Evansville"
.AddItem "Greensboro"
.AddItem "Heathrow"
.AddItem "Joplin"
.AddItem "Kennesaw"
.AddItem "Lafayette"
.AddItem "Manhattan"
.AddItem "Mansfield"
.AddItem "Sioux City"
.AddItem "Ottawa"
.AddItem "Ponco City"
.AddItem "Terra Haute"
End With
With NotSoFast.Month
.RowSource = ""
.AddItem "January"
.AddItem "February"
.AddItem "March"
.AddItem "April"
.AddItem "May"
.AddItem "June"
.AddItem "July"
.AddItem "August"
.AddItem "September"
.AddItem "October"
.AddItem "November"
.AddItem "December"
End With
With NotSoFast.Week
.RowSource = ""
.AddItem "Week 1"
.AddItem "Week 2"
.AddItem "Week 3"
.AddItem "Week 4"
.AddItem "Week 5"
End With
NotSoFast.Show
End Sub
---------------------------------------------------------
Also, the code will not compile unless I comment out anything pertaining to
Name. I get a "Compile Error: With object must be user-defined type, Object
or Variant" with the first With statement under Sub ShowNotSoFast(). If I
comment out that entire With Block I get a "Compile Error: Invalid Qualifier"
for Name in the NameSelect = Name.Value line under Private Sub
PanicSwitch_Click(). If I comment out both of those the code compiles. I've
retyped Name in Properties for the combobox and that didn't fix it. What's
the problem?
 
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
Initializing Userform not working WLMPilot Excel Programming 4 January 9th 08 04:59 PM
userform not working nrk2104 Excel Programming 1 October 17th 07 12:49 PM
Unloading UserForm not working Marston Excel Programming 2 August 17th 04 04:18 AM
Userform in excel97 not working right! Simon Lloyd[_485_] Excel Programming 3 June 15th 04 03:53 PM
Userform not working jrh Excel Programming 1 March 4th 04 09:51 AM


All times are GMT +1. The time now is 08:18 AM.

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"