Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default @how to select Name Box from ...

Sir,

How to select Name box and Formula Bar from keyboard? And how to rename a
worksheet tab from keyboard?

thanks in advance.

San


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default @how to select Name Box from ...


The F2 key will cause Excel to enter Edit mode. If the "Edit In Cell"
option is enabled, focus will be in the edit mode of the cell. If
"Edit In Cell" is not enabled, focus goes to the formula bar. For your
other questions, you can only address them with code. To set focus in
the Name dialog, paste the following in a code module:


Public Declare Function SetFocus Lib "user32" (ByVal hwnd As Long) As
Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As
Long
Public Declare Function FindWindowEx Lib "user32" Alias
"FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Sub SetFocusNameBox()
Dim Res As Long
Res = SetFocus( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString))
End Sub



To rename a sheet, use

Sub RenameWorksheet()
Application.CommandBars.FindControl(ID:=889).Execu te
End Suib

You can assign SetFocusNameBox and RenameWorskheet to the shortcut
keys of your choice.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]







On Tue, 12 Jan 2010 21:23:33 +0530, "Sandeep Lohchab"
wrote:

Sir,

How to select Name box and Formula Bar from keyboard? And how to rename a
worksheet tab from keyboard?

thanks in advance.

San

  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default @how to select Name Box from ...

Sir,

Please tell where do I paste these in a code module for setting focus on the
Name box and for renaming worksheet. Also tell how to create shortcut for
these.

Thanks in advance.

San

"Chip Pearson" wrote in message
...

The F2 key will cause Excel to enter Edit mode. If the "Edit In Cell"
option is enabled, focus will be in the edit mode of the cell. If
"Edit In Cell" is not enabled, focus goes to the formula bar. For your
other questions, you can only address them with code. To set focus in
the Name dialog, paste the following in a code module:


Public Declare Function SetFocus Lib "user32" (ByVal hwnd As Long) As
Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As
Long
Public Declare Function FindWindowEx Lib "user32" Alias
"FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Sub SetFocusNameBox()
Dim Res As Long
Res = SetFocus( _
FindWindowEx( _
FindWindowEx( _
FindWindow("XLMAIN", Application.Caption) _
, 0, "EXCEL;", vbNullString) _
, 0, "combobox", vbNullString))
End Sub



To rename a sheet, use

Sub RenameWorksheet()
Application.CommandBars.FindControl(ID:=889).Execu te
End Suib

You can assign SetFocusNameBox and RenameWorskheet to the shortcut
keys of your choice.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]







On Tue, 12 Jan 2010 21:23:33 +0530, "Sandeep Lohchab"
wrote:

Sir,

How to select Name box and Formula Bar from keyboard? And how to rename a
worksheet tab from keyboard?

thanks in advance.

San



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
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
how to randomly select a name in a list and then the select the ne [email protected] Excel Worksheet Functions 1 September 20th 06 08:09 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM


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