Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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
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
I need to sort an active sheet using the col of the active cell HamFlyer Excel Programming 3 June 6th 06 07:25 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM
create a form for search text in active sheet then got to selected toe Excel Programming 3 November 9th 05 02:09 AM
Using the Active cell in one sheet for another sheet JOHNNY_E Excel Discussion (Misc queries) 0 May 4th 05 06:19 AM


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