Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Find Metohd again...

Hi Group,

Will try to clearify my earlier question.
Try to make below code to work but need some help.

ActiveSheet when running the code is Worksheets(1).

1- Is the FindMethod working when the "search area " is in another
worksheet in the same workbook. ( without activating of this wksh)?
2- Code below seems not to work. Is it the syntax of the "search area"
that is wrong?

Thanks for any help

Brgds

CG Rosén

Dim k
With Worksheets(2).Range("A1:A100") '????????
Set k = .Find(ComboBox1.Text, LookIn:=xlValues)
If k Is Nothing Then
code.....
Else
code....
End If
End With


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find Metohd again...

CG,

What happens, you say seems not to work, but in what way? Which worksheet is
Combobox1 on?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CG Rosén" wrote in message
...
Hi Group,

Will try to clearify my earlier question.
Try to make below code to work but need some help.

ActiveSheet when running the code is Worksheets(1).

1- Is the FindMethod working when the "search area " is in another
worksheet in the same workbook. ( without activating of this wksh)?
2- Code below seems not to work. Is it the syntax of the "search area"
that is wrong?

Thanks for any help

Brgds

CG Rosén

Dim k
With Worksheets(2).Range("A1:A100")

'????????
Set k = .Find(ComboBox1.Text, LookIn:=xlValues)
If k Is Nothing Then
code.....
Else
code....
End If
End With




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Find Metohd again...

Hi Bob,

Sorry, my question might be unclear. The combobox is in worksheet(1). The
lookup
text in the Combobox1 is for certain in the lookup area in Worksheet(2) but
the found
item is always nothing.

Brgds

CG Rosén


What happens, you say seems not to work, but in what way? Which worksheet

is
Combobox1 on?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CG Rosén" wrote in message
...
Hi Group,

Will try to clearify my earlier question.
Try to make below code to work but need some help.

ActiveSheet when running the code is Worksheets(1).

1- Is the FindMethod working when the "search area " is in another
worksheet in the same workbook. ( without activating of this wksh)?
2- Code below seems not to work. Is it the syntax of the "search area"
that is wrong?

Thanks for any help

Brgds

CG Rosén

Dim k
With Worksheets(2).Range("A1:A100")

'????????
Set k = .Find(ComboBox1.Text, LookIn:=xlValues)
If k Is Nothing Then
code.....
Else
code....
End If
End With






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find Metohd again...

CG,

I assume that as you are not qualifying the Combobox1 with Worksheets(1)
that the find code is in Worksheets(1) code module as well?

I created a simple test to emulate what you are doing and I found it okay.

What triggers the find code?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CG Rosén" wrote in message
...
Hi Bob,

Sorry, my question might be unclear. The combobox is in worksheet(1). The
lookup
text in the Combobox1 is for certain in the lookup area in Worksheet(2)

but
the found
item is always nothing.

Brgds

CG Rosén


What happens, you say seems not to work, but in what way? Which

worksheet
is
Combobox1 on?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CG Rosén" wrote in message
...
Hi Group,

Will try to clearify my earlier question.
Try to make below code to work but need some help.

ActiveSheet when running the code is Worksheets(1).

1- Is the FindMethod working when the "search area " is in another
worksheet in the same workbook. ( without activating of this wksh)?
2- Code below seems not to work. Is it the syntax of the "search area"
that is wrong?

Thanks for any help

Brgds

CG Rosén

Dim k
With Worksheets(2).Range("A1:A100")

'????????
Set k = .Find(ComboBox1.Text, LookIn:=xlValues)
If k Is Nothing Then
code.....
Else
code....
End If
End With








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
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
where to put results of find operation in find and replace functio DEP Excel Worksheet Functions 5 November 15th 06 07:52 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
'find' somtimes can't find numbers. I folowd the 'help' instructi. Yaron Excel Worksheet Functions 2 November 30th 05 05:46 PM
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? nwtrader8 Excel Discussion (Misc queries) 5 June 21st 05 02:16 PM


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