#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Input box data check

Hello everyone,
I'm trying to create an input box that woulk ask for a worksheet name, which
is one of a hundred worksheets. If the name is incorrect or a name is not
given then a msg box would come up and repeat the request again. After 3
times a file will appear to assist the user. How can I resolve this. Thanks.
--
Mark
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Input box data check

Maybe use a drop down with a list of the sheets.
http://www.contextures.com/tiptech.html

Or, a worksheet_double click event to goto the sheet where the name is in a
cell. Make a list using a macro.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
GetWorkbook ' calls another macro to do that
Else
Application.GoTo Sheets(WantedSheet).Range("a4")
End If
Application.DisplayAlerts = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mark" wrote in message
...
Hello everyone,
I'm trying to create an input box that woulk ask for a worksheet name,
which
is one of a hundred worksheets. If the name is incorrect or a name is not
given then a msg box would come up and repeat the request again. After 3
times a file will appear to assist the user. How can I resolve this.
Thanks.
--
Mark


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Input box data check

Hey Don thanks. I just got back on and noticed your reply.
I did put the following together but it doesn't answer everything that I
need. i will check yours out. Here's what I put together:
For Each ws in Worksheets
If ws.Name = Inputdata Then
ws.Activate
Exit Sub
End If
Next
--
Mark


"Don Guillett" wrote:

Maybe use a drop down with a list of the sheets.
http://www.contextures.com/tiptech.html

Or, a worksheet_double click event to goto the sheet where the name is in a
cell. Make a list using a macro.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
GetWorkbook ' calls another macro to do that
Else
Application.GoTo Sheets(WantedSheet).Range("a4")
End If
Application.DisplayAlerts = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mark" wrote in message
...
Hello everyone,
I'm trying to create an input box that woulk ask for a worksheet name,
which
is one of a hundred worksheets. If the name is incorrect or a name is not
given then a msg box would come up and repeat the request again. After 3
times a file will appear to assist the user. How can I resolve this.
Thanks.
--
Mark



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Input box data check

This sub will made a list of your activeworkbook sheets in col A. Then you
can use my doubleclick

Sub listsheets()
For i = 1 To Sheets.Count
Cells(i, "a") = Sheets(i).Name
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mark" wrote in message
...
Hey Don thanks. I just got back on and noticed your reply.
I did put the following together but it doesn't answer everything that I
need. i will check yours out. Here's what I put together:
For Each ws in Worksheets
If ws.Name = Inputdata Then
ws.Activate
Exit Sub
End If
Next
--
Mark


"Don Guillett" wrote:

Maybe use a drop down with a list of the sheets.
http://www.contextures.com/tiptech.html

Or, a worksheet_double click event to goto the sheet where the name is in
a
cell. Make a list using a macro.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
GetWorkbook ' calls another macro to do that
Else
Application.GoTo Sheets(WantedSheet).Range("a4")
End If
Application.DisplayAlerts = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mark" wrote in message
...
Hello everyone,
I'm trying to create an input box that woulk ask for a worksheet name,
which
is one of a hundred worksheets. If the name is incorrect or a name is
not
given then a msg box would come up and repeat the request again. After
3
times a file will appear to assist the user. How can I resolve this.
Thanks.
--
Mark




  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Input box data check

GetWorkbook ' calls another macro to do that
Could you kindly post the above sub?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Input box data check

Hey Don,

Just got back from the holidays. I ran your routine and it works great,
thanks. Is there a book I could get to help me on VBA in Excel (one that has
lots of examples)?
Again thanks.
--
Mark


"Mark" wrote:

Hello everyone,
I'm trying to create an input box that woulk ask for a worksheet name, which
is one of a hundred worksheets. If the name is incorrect or a name is not
given then a msg box would come up and repeat the request again. After 3
times a file will appear to assist the user. How can I resolve this. Thanks.
--
Mark

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
How to use Check Box input in a cell's fomula? WentBlank Excel Worksheet Functions 1 June 29th 07 01:22 AM
Check input is a date stumac Excel Discussion (Misc queries) 5 December 14th 06 03:28 PM
Validy check in one coulmn to limit input options in another? Katja Excel Worksheet Functions 2 January 5th 06 06:53 PM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM


All times are GMT +1. The time now is 06:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"