View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tbaam tbaam is offline
external usenet poster
 
Posts: 8
Default passing a comboxbox result into sheets.select

I have a form that has a combo box in it. The combo box allows the user to
select a chapter. The chapter happens to be worksheet in a workbook.

How do i pass from the combo box into the macro.

This is what I want:
With ComboBox8
.AddItem "Chapter 1"
.AddItem "Chapter 2"
.AddItem "Chapter 3"
End With
Chapter = ComboBox8.Value
Sheets(Chapter).Select

*** if I write Sheets("Chapter 1") it works great...but just putting it
Chapter fails