ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheet selection from an input box - Thank you (https://www.excelbanter.com/excel-programming/419353-sheet-selection-input-box-thank-you.html)

Eduardo

sheet selection from an input box - Thank you
 
How can I get a sheet within a worksheet to be selected when entering the
name in an input Box.
For Example, I have a different sheet for each employee and I want then to
go to their sheet and enter daily information. Sheets for each employee is
hidden and password protected so when running the macro it will ask for your
name, once is entered it will ask for your password, if password is correct
it will open the sheet otherwise it will tell you Password incorrect. Is it
possible. thank you

Gary''s Student

sheet selection from an input box - Thank you
 
Sub sheet_picker()
Dim s As String
s = Application.InputBox(prompt:="enter sheetname:", Type:=2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200811

Eduardo

sheet selection from an input box - Thank you
 
Hi Gary, that was awesome, so easy and works perfect. Thank you so much

"Gary''s Student" wrote:

Sub sheet_picker()
Dim s As String
s = Application.InputBox(prompt:="enter sheetname:", Type:=2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200811


Eduardo

sheet selection from an input box - Thank you
 
Gary just a question what Type:=2 means

"Gary''s Student" wrote:

Sub sheet_picker()
Dim s As String
s = Application.InputBox(prompt:="enter sheetname:", Type:=2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200811


Gary''s Student

sheet selection from an input box - Thank you
 
It just insures that a String gets returned and not a number.

By the way, I don't know how to do the password thing.
--
Gary''s Student - gsnu200811


"Eduardo" wrote:

Gary just a question what Type:=2 means

"Gary''s Student" wrote:

Sub sheet_picker()
Dim s As String
s = Application.InputBox(prompt:="enter sheetname:", Type:=2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200811


Eduardo

sheet selection from an input box - Thank you
 
Thank you again and have a great weekend

"Gary''s Student" wrote:

It just insures that a String gets returned and not a number.

By the way, I don't know how to do the password thing.
--
Gary''s Student - gsnu200811


"Eduardo" wrote:

Gary just a question what Type:=2 means

"Gary''s Student" wrote:

Sub sheet_picker()
Dim s As String
s = Application.InputBox(prompt:="enter sheetname:", Type:=2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200811


Gary''s Student

sheet selection from an input box - Thank you
 
And you also
--
Gary''s Student - gsnu200811


"Eduardo" wrote:

Thank you again and have a great weekend

"Gary''s Student" wrote:

It just insures that a String gets returned and not a number.

By the way, I don't know how to do the password thing.
--
Gary''s Student - gsnu200811


"Eduardo" wrote:

Gary just a question what Type:=2 means

"Gary''s Student" wrote:

Sub sheet_picker()
Dim s As String
s = Application.InputBox(prompt:="enter sheetname:", Type:=2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200811



All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com