Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get selected cell on sheet that is not the active sheet
I can't seem to get the address of the selected cell that is not on the activesheet. Anybody know how to do this in 2003? -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=163314 Microsoft Office Help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get selected cell on sheet that is not the active sheet
On Dec 18, 1:49*am, joel wrote:
I can't seem to get the address of the selected cell that is not on the activesheet. *Anybody know how to do this in 2003? Let's say you have a sheet named "Sheet3" and you want the E4 cell in this sheet to have the text "Joel". This can be achieved as follows: Sheets("Sheet3").Cells(4, 5).Value = "Joel" HTH |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get selected cell on sheet that is not the active sheet
Please read the question better, your answer isn't even close to answering the question. -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=163314 Microsoft Office Help |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get selected cell on sheet that is not the active sheet
The worksheet that you want the active cell address has to be active. So
activate the sheet first then you can get your active cell. For example, Sheets("Sheet1").Activate MsgBox ActiveCell.Address or you can loop thru all the sheets in your workbook and find all the active cells. Sub FindSelectedCell() Dim wks As Worksheet For Each wks In Worksheets .Activate MsgBox ActiveCell.Address Next wks End Sub -- Cheers, Ryan "joel" wrote: I can't seem to get the address of the selected cell that is not on the activesheet. Anybody know how to do this in 2003? -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=163314 Microsoft Office Help . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get selected cell on sheet that is not the active sheet
To get the last active cell of an inactive sheet you need to make that sheet
active You can can try something along these lines: Sub ActiveCellOnSheet2() Dim ActCell As Range Dim LastCell As Range Set ActCell = ActiveCell With Application .ScreenUpdating = False Worksheets(2).Activate Set LastCell = ActiveCell .Goto ActCell .ScreenUpdating = True End With MsgBox ActCell.Address(0, 0) & Chr(10) & LastCell.Address(0, 0) End Sub -- jb "joel" wrote: I can't seem to get the address of the selected cell that is not on the activesheet. Anybody know how to do this in 2003? -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=163314 Microsoft Office Help . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need to sort an active sheet using the col of the active cell | Excel Programming | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
Copy from active sheet and paste into new sheet using info from cell in active | Excel Programming | |||
create a form for search text in active sheet then got to selected | Excel Programming | |||
Using the Active cell in one sheet for another sheet | Excel Discussion (Misc queries) |