• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in (scripting) Excel.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in (scripting) Excel.


  • Subject: Re: Bug in (scripting) Excel.
  • From: David Wignall <email@hidden>
  • Date: Mon, 29 Sep 2003 19:10:48 +1200

on 29/9/2003 2:38 AM, Deivy Petrescu at email@hidden wrote:

> On Sunday, Sep 28, 2003, at 01:56 US/Eastern, David Wignall wrote:
>
>> <snip>
>>
>>> The problem is the command "set ScreenUpdating to false".
>>
>> <snip>
>>
>>> It is however a drag to not "set ScreenUpdating to false"... It will
>>> be much slower.
>>
>> Late to the thread, so I may have missed this but why do you need to
>> activate anything? Once the workbooks are open you can just refer to
>> them by
>> name or index number

<snip>

> This actually works. It is not a good solution in my case, because it
> has to be inserted in every command you have targeting the worksheet,
> or it will default back to the last workbook opened.

tell Application "Microsoft Excel"
repeat with intWkb from 1 to (count of Workbooks)
repeat with intWks from 1 to (count of Worksheets of Workbook
(intWkb)) --1 line
set var to Value of (CurrentRegion of Range ("A1") of Worksheet
(intWks) of Workbook (intWkb)) --1 line
repeat with varRowValues in var
repeat with varColumnValue in varRowValues
display dialog varColumnValue as string
end repeat
end repeat
end repeat
end repeat
end tell

Easier for me in VBA :)

Sub basObjectWork()

Dim wkb As Workbook
Dim wks As Worksheet
Dim var As Variant
Dim x As Long
Dim y As Long

For Each wkb In Workbooks
For Each wks In wkb.Worksheets
var = wks.Range("A1").CurrentRegion
For x = 1 To UBound(var, 1)
For y = 1 To UBound(var, 2)
Debug.Print wkb.Name; wks.Name; var(x, y)
Next
Next
Next wks
Next wkb

End Sub

--
fwiw
Dave
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Bug in (scripting) Excel. (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: a script object (class) as a member of another script object
  • Next by Date: Re: a script object (class) as a member of another script object
  • Previous by thread: Re: Bug in (scripting) Excel.
  • Next by thread: Re: Bug in (scripting) Excel.
  • Index(es):
    • Date
    • Thread