#1   Report Post  
naiveprogrammer
 
Posts: n/a
Default Dialog Boxes

How can I hide the worksheets in a workbook and only show the dialog box? I
want my users to be able to click and go to whatever sheet they need to.

Thanks!!!
  #2   Report Post  
Vacation's Over
 
Posts: n/a
Default Dialog Boxes

unless the file is an addin at least one sheet must be visible.

You could try formatting an opening sheet without gridlines and with a color
or pattern to make it not look like a sheet....

"naiveprogrammer" wrote:

How can I hide the worksheets in a workbook and only show the dialog box? I
want my users to be able to click and go to whatever sheet they need to.

Thanks!!!

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default Dialog Boxes

How about...

Create a new worksheet. Call it "Index"

Plop a combobox from the control toolbox toolbar on that worksheet.
(maybe add some instructions to the users on what to do.)

Then behind the ThisWorkbook module, put this code:

Option Explicit
Private Sub Workbook_Open()

Dim iCtr As Long

With Me.Worksheets("Index").ComboBox1
.Clear
For iCtr = 1 To Me.Sheets.Count
If LCase(Me.Sheets(iCtr).Name) = "index" Then
'do nothing
Else
Me.Sheets(iCtr).Visible = xlSheetHidden
.AddItem Me.Sheets(iCtr).Name
End If
Next iCtr
End With

End Sub

Then behind the Index module, put this code:

Option Explicit
Private Sub ComboBox1_Change()

Dim iCtr As Long
Dim mySheetName As String
Dim otherSheetName As String

If Me.ComboBox1.ListIndex < 0 Then
Exit Sub
End If

mySheetName = LCase(Me.ComboBox1.Value)

For iCtr = 1 To Me.Parent.Sheets.Count
Select Case LCase(Me.Parent.Sheets(iCtr).Name)
Case Is = "index"
'do nothing to this sheet
Case Is = mySheetName
Me.Parent.Sheets(mySheetName).Visible = xlSheetVisible
Me.Parent.Sheets(mySheetName).Select
Case Else
Me.Parent.Sheets(iCtr).Visible = xlSheetHidden
End Select
Next iCtr

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

naiveprogrammer wrote:

How can I hide the worksheets in a workbook and only show the dialog box? I
want my users to be able to click and go to whatever sheet they need to.

Thanks!!!


--

Dave Peterson
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
editing custom dialog boxes Shadowrift Excel Worksheet Functions 5 August 19th 05 07:48 PM
Automatically Close Dialog Boxes chriskane Excel Worksheet Functions 2 August 9th 05 12:14 PM
Dialog boxes webster Excel Discussion (Misc queries) 5 July 9th 05 11:16 AM
Copying and Pasting in dialog boxes Robert Excel Discussion (Misc queries) 1 January 19th 05 11:22 PM
How can I change the size of dialog boxes? Dale Hildebrand Excel Discussion (Misc queries) 2 December 2nd 04 05:12 PM


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