LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Dynamic Dependant Downloads

Hi
I want a user to select a year 2001 to 2010, and then based on this
selection choose a (Friday) weekend date. Other calculations are dependant
upon the results from this last selection.

I can do this without programming using data validation and the indirect
function. However I wanted to try to do it using combo boxes.

In the past I have only used the combo box from the forms toolbar and the
input range does not recognise the INDIRECT function, or at least does not
behave in the same way as data validation.

When using the combo box from the control toolbox toolbar the indirect
function does not appear to work when =INDIRECT is entered in the
ListFillRange box in properties.

I searched the discussion groups for a solution and I was directed to
www.xldynamic.com/source/xld.Dropdowns.html from multiple postings.

I copied / imported all of the code and modified it to meet my requirements
re worksheet names (I replaced €śdata€ť with €śWeekEndingDates€ť) in the module
mComboMaintain and elsewhere as required.

When I open the workbook, after a while an error message appears

Compile error, variable not defined.

When debugging €ścombo€ť is highlighted in blue in the line
€śWith combo.cboPrimary€ť

The complete code is given below. Can anyone indicate where I need to look?

Regards
Phil Smith

Option Explicit

'---------------------------------------------------------------------
Public Function fzPopulatList1()
'---------------------------------------------------------------------
Dim i As Long

Application.EnableEvents = False
'On Error GoTo pl1_exit

With combo.cboPrimary
.Clear
For i = 2 To Range(kList1Hnd).Count + 1
.AddItem WeekEndingDates.Cells(1, i).Value
Next i

Application.EnableEvents = True
.ListIndex = 0
End With

pl1_exit:
Application.EnableEvents = True

End Function

 
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
Importing downloads into Excel Marsh New Users to Excel 2 December 13th 06 12:46 AM
How do I resolve unsuccessful security downloads for excel? juju Excel Discussion (Misc queries) 0 July 14th 06 03:04 PM
Comma delimiter for csv downloads? Les M Excel Discussion (Misc queries) 7 January 31st 06 01:03 AM
File Downloads in VBA Sysygy Excel Discussion (Misc queries) 1 April 8th 05 06:45 PM
How do I find downloads for workbooks for Accounting homework? [email protected] Excel Worksheet Functions 1 November 2nd 04 06:38 PM


All times are GMT +1. The time now is 05:38 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"