From: Pegasus (MVP) on 27 Jan 2009 12:29 "Codeblack" <Codeblack(a)discussions.microsoft.com> wrote in message news:A6FBB2F8-D39F-43C2-97DA-CC4BFDAE6E4E(a)microsoft.com... >I Tried this but it is not retriving any value from the cell. I did tried > writing the value using Wscript.echo and it was not printing anything. It worked for me - let's see your code!
From: Codeblack on 29 Jan 2009 11:57 Thanks a lot for your timely help. this is working now. But the script is finding only one occurence of the stirng in the excel sheet. If there are multiple occurence of the string in the same sheet, then it is not showing the details. For example : if the search string "abc" is in Sheet1: Row1 and also in Row 45, the output is showing only the Row1 and not showing Row 45. Do you have any clue why this is happening.
From: Pegasus (MVP) on 29 Jan 2009 12:14 "Codeblack" <Codeblack(a)discussions.microsoft.com> wrote in message news:3C85DD8A-C0C7-4676-94DD-B5579811F03B(a)microsoft.com... > Thanks a lot for your timely help. this is working now. But the script is > finding only one occurence of the stirng in the excel sheet. If there are > multiple occurence of the string in the same sheet, then it is not showing > the details. > > For example : if the search string "abc" is in Sheet1: Row1 and also in > Row > 45, the output is showing only the Row1 and not showing Row 45. > > Do you have any clue why this is happening. I was going to have a look at your script but had second thoughts when I noticed that you appear to run to threads on much the same subject and that you seem to be reluctant to post the code that you're having problems with.
From: Codeblack on 29 Jan 2009 12:37 In the initial thread i was facing issues in getting sheet number. but later i got it rectified. If you see my previous thread and this thread there are slight modificatios to the code.
From: Matthias Tacke on 29 Jan 2009 13:03 Codeblack wrote: > Thanks a lot for your timely help. this is working now. But the script is > finding only one occurence of the stirng in the excel sheet. If there are > multiple occurence of the string in the same sheet, then it is not showing > the details. > > For example : if the search string "abc" is in Sheet1: Row1 and also in Row > 45, the output is showing only the Row1 and not showing Row 45. > > Do you have any clue why this is happening. Yes, there is nothing in your code to iterate through multiple occurrences in a worksheet. You only use for each to iterate through the worksheets. Since I'm actually using OpenOffice and don't have the time to fire up another pc or vm with Excel installed, I suggest you take the time and format your source with proper indentation to better follow the script flow. I guess you (incompletely) copied the source from (several) sources and don't understand the code. I don't know what objWorkSheet.Cells.Find returns if no more occurrences are found, but you should include that section in a while..wend or do..until structure. The command objCell = Nothing is nonsense because you'll need the previous value to be able to continue the search from the last found position. If you haven't done already I suggest you get the most recent script5x.chm file to learn the basics. -- Regards Matthias
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Help desperately needed. Next: Connecting to Win32_DFSTarget on Windows Server 2008 |