Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
which line is generating the error? Regards FSt1 "scott56hannah" wrote: I have workbook which has a number of reference worksheets that need to be hidden from the users view. Those sheets need to be referred to by a UserForm as part of drop down lists and other validations. When trying to populate the combo box I get the following error.... Run-time error '1004': Select method of Range class failed Refer to the routine that is trying to create the list below Public Sub SetAllLists() 'This routine will set all lists with the current values that are in place at that time 'Create the Building Drop Down list for the Inspection form Worksheets("Reference").Activate Worksheets("Reference").Range("ReferenceBuildingHe adingStart").Select If ActiveCell.Offset(1, 0).Value = "" Then ActiveCell.Offset(1, 0).Select 'If there is only one entry in the List box then no need to sort or do multiple selection ElseIf ActiveCell.Offset(2, 0).Value = "" Then ActiveCell.Offset(1, 0).Select 'If more than one entry then use the sort to refresh the list Else ActiveCell.Offset(1, 0).Select Range(Selection, Selection.End(xlDown)).Select Selection.Sort Key1:=Range("ReferenceBuildingHeadingStart"), _ Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom End If 'Now reset the List of details shown on the page Inspection.frmBuildingComboBox.RowSource = ActiveWindow.RangeSelection.Address End Sub Is there any way to refer to data to worksheets that are hidden without getting this error ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display a hidden worksheet in Excel 2007? | Excel Discussion (Misc queries) | |||
Is it possible to display worksheets cells in a userform | Excel Programming | |||
Creating a varying UserForm using cells from a hidden worksheet | Excel Programming | |||
Reference a cell in a worksheet from a userform | Excel Programming | |||
Excel2000; display worksheet in userform | Excel Programming |