Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default @How to add new worksheet on right side....


"Sandeep Lohchab" wrote in message
...
Sir,

How to add new worksheet on right side of current selected worksheet? When
I press Shift+F11, new worksheet comes on left side, but I want it to
appear on right side. Another situation is that when I have many worksheet
opened, like 15+, then I have to press Ctrl+PageUp/PageDown many times to
select extreme left/right worksheet. Can there be a shortcut to make this
happen?

Also please tell where do I paste these(written below) in a code modulefor
setting focus on the
Name box and for renaming worksheet. Also tell how to create shortcut for
these.

Thanks in advance.
Warm Regards.
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
@How to add new worksheet on right side.... Sandeep Lohchab Excel Discussion (Misc queries) 0 January 14th 10 02:53 AM
Worksheet frozen after using Compare side by side Ann Excel Discussion (Misc queries) 0 April 22nd 09 04:08 PM
Grey bar at left side of worksheet Andrea Excel Discussion (Misc queries) 2 July 22nd 08 10:33 AM
How2 setup one page distribution report side by side results sailorgirl Charts and Charting in Excel 0 August 20th 07 09:14 PM
Display columns side by Side in the Data Area of a Pivot table Sue Excel Discussion (Misc queries) 1 March 21st 06 02:12 AM


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

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"