Applescript vs. Excel

B

Busterboi

Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Okay... ive gotta prob.

At work, i must creat an table with excel... first i use excel 2004 and build some macros and all works... but then, me boss give me the order to update the table for office 2008... now, ther is the problem. Macros doesnt work in excel 2008. i switch to applescript... but is it possible to "save" the formated cells? like an form in word?

so long...
 
B

Bob Greenblatt

Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel
Okay... ive gotta prob.

At work, i must creat an table with excel... first i use excel 2004 and build
some macros and all works... but then, me boss give me the order to update the
table for office 2008... now, ther is the problem. Macros doesnt work in excel
2008. i switch to applescript... but is it possible to "save" the formated
cells? like an form in word?

so long...
I¹m not sure what you want to do. What is being done in VBA? Do you mean to
save the workbook as a template? Then sure, you can do this in applescript.
 
B

Busterboi

okay... let me try to explain... (i`m german... for me its very difficult ;) )

excel 2004:

Sub rz5z()
'
' rz5z Makro
'
    ActiveCell.FormulaR1C1 = "abc"
    Range("D65").Select
    ActiveCell.FormulaR1C1 = "123"
End Sub

excel 2008:

tell application "Microsoft Excel"
        tell document "random.xls"
                tell sheet "Random"

set value of cell "D63" to "abc"
                set value of cell "D65" to "123"

end tell
        end tell
end tell

than to protect the cell

excel 2004 click right mousebutton->protection->locked work if you protect the whole sheet...

right?
and you can do it allso in an macro...

but what is the script for the same function?

what must i do to protect only selected cells?

hope you can understand my very evil "denglish" (is a german word for a german-english-mix^^)
 
M

Michael Vilain

Bob Greenblatt said:
I¹m not sure what you want to do. What is being done in VBA? Do you mean to
save the workbook as a template? Then sure, you can do this in applescript.

It's MacOS with Excel in Office 2008. I'd heard they removed VBA and
replaced it with Applescript. So, is there a way to get VBA stuff to
work on MacOS in spite of this?
 
B

Bob Greenblatt

It's MacOS with Excel in Office 2008. I'd heard they removed VBA and
replaced it with Applescript. So, is there a way to get VBA stuff to
work on MacOS in spite of this?
No. There is no VBA in Office 2008. They did not replace VBA with
AppleScript. AppleScript and the original XLM macro language were always
present and still are in Office 2008. Just VBA was removed.
 
B

Bob Greenblatt

okay... let me try to explain... (i`m german... for me its very difficult ;) )

excel 2004:

Sub rz5z()
'
' rz5z Makro
'
ActiveCell.FormulaR1C1 = "abc"
Range("D65").Select
ActiveCell.FormulaR1C1 = "123"
End Sub

excel 2008:

tell application "Microsoft Excel"
tell document "random.xls"
tell sheet "Random"

set value of cell "D63" to "abc"
set value of cell "D65" to "123"

end tell
end tell
end tell

than to protect the cell

excel 2004 click right mousebutton->protection->locked work if you protect the
whole sheet...

right?
and you can do it allso in an macro...

but what is the script for the same function?

what must i do to protect only selected cells?

hope you can understand my very evil "denglish" (is a german word for a
german-english-mix^^)
Your English is quite good, don¹t worry about it. It¹s much better than my
German. In any case look in the AppleScript dictionary for the correct
terms. I believe it is ³protect sheet². Cell, sheet and workbook protection
work exactly the same in Excel 2004 and 2008. You need to set the proper
cell protection for the cells of interest and then protect the sheet, just
like in 2004.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top