Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

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
Combo Box Selection Changes w/o Input BJ Excel Programming 0 September 5th 08 06:50 PM
Input selection choices ARGT Excel Discussion (Misc queries) 4 July 8th 08 03:59 AM
VBA Cell Selection via input box JTech Excel Programming 9 February 29th 08 03:09 AM
Input two cells with one selection Keith[_11_] Excel Programming 4 June 22nd 05 03:07 PM
Input box does not allow selection in another file Tom Ogilvy Excel Programming 2 August 26th 04 04:53 AM


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