Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem cuz of Hidden sheet


Hi there

The sheet 2 should the activesheet, cuz the sheet1,where my data, i
hidden.

i need to select the row in the sheet1 where my found result (r) exis
in, so i used this line:


Code
-------------------
ThisWorkbook.Sheets(1).Cells(r, 1).EntireRow.Select
-------------------


but it gives me wrong msg: Select method of Range class Failed.

How can select the row without having to activate the sheet1


Code
-------------------

Sub t()
Dim r, o As Long

r = ThisWorkbook.Sheets(1).Cells.Find(What:=1).Row
ThisWorkbook.Sheets(1).Cells(r, 1).EntireRow.Select

End Sub
-------------------

--
helmekk

-----------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693
View this thread: http://www.excelforum.com/showthread.php?threadid=37842

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Problem cuz of Hidden sheet

You can't select cells on a hidden sheet. But that really
shouldn't matter because it is hardly ever necessary to select a
cell. Use a Range object variable instead.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"helmekki"
wrote in
message
...

Hi there

The sheet 2 should the activesheet, cuz the sheet1,where my
data, is
hidden.

i need to select the row in the sheet1 where my found result
(r) exist
in, so i used this line:


Code:
--------------------
ThisWorkbook.Sheets(1).Cells(r, 1).EntireRow.Select
--------------------


but it gives me wrong msg: Select method of Range class Failed.

How can select the row without having to activate the sheet1


Code:
--------------------

Sub t()
Dim r, o As Long

r = ThisWorkbook.Sheets(1).Cells.Find(What:=1).Row
ThisWorkbook.Sheets(1).Cells(r, 1).EntireRow.Select

End Sub
--------------------


--
helmekki


------------------------------------------------------------------------
helmekki's Profile:
http://www.excelforum.com/member.php...fo&userid=6939
View this thread:
http://www.excelforum.com/showthread...hreadid=378424



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem cuz of Hidden sheet


Thank u , problem solved


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=378424

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
Hidden sheet problem Freshman Excel Worksheet Functions 0 October 23rd 07 03:17 PM
I need my Hidden Rows to stay hidden when I print the sheet. Rosaliewoo Excel Discussion (Misc queries) 2 July 20th 06 07:51 PM
Problem with hidden file jim simpson Excel Programming 4 January 8th 05 05:25 PM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Dick Kusleika[_3_] Excel Programming 2 January 21st 04 04:39 PM
Problem pasting a row from a hidden sheet to the first free row on another visible sheet Didier Poskin Excel Programming 2 January 10th 04 01:18 AM


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