Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Input box data check
GetWorkbook ' calls another macro to do that
Could you kindly post the above sub? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use Check Box input in a cell's fomula? | Excel Worksheet Functions | |||
Check input is a date | Excel Discussion (Misc queries) | |||
Validy check in one coulmn to limit input options in another? | Excel Worksheet Functions | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
Running Data Table using an input that triggers DDE linked data | Excel Discussion (Misc queries) |