Re: Excel question
Re: Excel question
- Subject: Re: Excel question
- From: Antonio Palluan <email@hidden>
- Date: Sat, 1 Apr 2006 21:38:52 +0200
tell application "Microsoft Excel" set marc to find range "$a:$a" what "mark" set row to get first row index of mark set targetcell to "[Fattdettagl.xls]Foglio1!$B$" & row .... end tell
... - Your main problem here is that you set the variable for the range to 'marc' (with a "c") and then in the next line you're looking for the first row index of 'mark' (with a "k"). That's going to error
-
- Once you clear that up, in the second line, you cannot use the word 'row' as a variable name, since it's a class name in Excel. I don't understand how you even got that line to compile - here I get "access not allowed" error. I think you've probably cheated in writing to the mailing list - you probably used a different word (maybe the Italian for 'row'?). As long as you use an acceptable word that's not a reserved keyword, that line works and returns 3.
- Then in line 3, there are two problems. First, you don't need to include the name of the file. (The reason you've been getting that when checking for results is that you have not included any identification for the worksheet anywhere. You really ought to be directing everything to 'of active sheet'. It's working anyway, since that's what Excel will coerce to.)
- Second, you don't just need the targetCell's text name, you need the actual cell, right?
Thank you very much for your answer Paul, everything is clear now. It's correct, I've make a simple example translating from italian, of course mark and marc has been an oversight, in the true script the variable were identical, and aslo the row, i wrote it in italian so it was correct. Thank you for your clear explanation, the problem was all in the third line...
Antonio |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden