Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Return Activecell row number from another sheet

I'm sure I know how to do this but for some reason I'm blanking...

The program is currently working in SheetB. I want to return the row number
for the ActiveCell in SheetA (without having to activate it). SheetA is in
the same open workbook, is visible, is NOT protected. I then need to
determine if the cell in column 5 for that row number on SheetA is blank.

Can someone please help me out in remembering how to do this?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Return Activecell row number from another sheet

I am affraid you have to select the other sheet in order to access the
activecell on that sheet (To the best of my knowledge). Here is some code for
you. It is a function that returns whether the E column is empty or not. The
active cell is just like it says the active cell. If the sheet is not active
then the cell is not active... This function returns you to the original
sheet where you started from...

Private Function BlankActive() As Boolean
Dim wksFrom As Worksheet
Dim wksToCheck As Worksheet
Dim blnReturnValue As Boolean

Application.ScreenUpdating = False
Set wksFrom = ActiveSheet
Set wksToCheck = Sheets("Sheet3")

wksToCheck.Select
If Intersect(ActiveCell.EntireRow,
wksToCheck.Range("E1").EntireColumn).Value < Empty Then
blnReturnValue = False
Else
blnReturnValue = True
End If
wksFrom.Select
BlankActive = blnReturnValue
Application.ScreenUpdating = True
End Function

"quartz" wrote:

I'm sure I know how to do this but for some reason I'm blanking...

The program is currently working in SheetB. I want to return the row number
for the ActiveCell in SheetA (without having to activate it). SheetA is in
the same open workbook, is visible, is NOT protected. I then need to
determine if the cell in column 5 for that row number on SheetA is blank.

Can someone please help me out in remembering how to do this?

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Return Activecell row number from another sheet

Okay, thanks much Jim.

I could have sworn there was a way to do this, but I guess not. Thanks for
your solution.

"Jim Thomlinson" wrote:

I am affraid you have to select the other sheet in order to access the
activecell on that sheet (To the best of my knowledge). Here is some code for
you. It is a function that returns whether the E column is empty or not. The
active cell is just like it says the active cell. If the sheet is not active
then the cell is not active... This function returns you to the original
sheet where you started from...

Private Function BlankActive() As Boolean
Dim wksFrom As Worksheet
Dim wksToCheck As Worksheet
Dim blnReturnValue As Boolean

Application.ScreenUpdating = False
Set wksFrom = ActiveSheet
Set wksToCheck = Sheets("Sheet3")

wksToCheck.Select
If Intersect(ActiveCell.EntireRow,
wksToCheck.Range("E1").EntireColumn).Value < Empty Then
blnReturnValue = False
Else
blnReturnValue = True
End If
wksFrom.Select
BlankActive = blnReturnValue
Application.ScreenUpdating = True
End Function

"quartz" wrote:

I'm sure I know how to do this but for some reason I'm blanking...

The program is currently working in SheetB. I want to return the row number
for the ActiveCell in SheetA (without having to activate it). SheetA is in
the same open workbook, is visible, is NOT protected. I then need to
determine if the cell in column 5 for that row number on SheetA is blank.

Can someone please help me out in remembering how to do this?

Thanks in advance.

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 do I return the location (as a range) of ActiveCell? Caeres Excel Discussion (Misc queries) 4 October 6th 08 09:44 PM
lookup single value in one sheet, return multiple results from theother sheet Chuck[_3_] Excel Worksheet Functions 1 April 4th 08 06:17 AM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
Return number of current sheet Brandon Excel Worksheet Functions 3 April 26th 05 05:55 AM
ActiveCell to top left cell of a sheet Tom Atkisson Excel Programming 3 October 1st 03 01:52 PM


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