LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA formulas in javascript

Hi,
I'm trying to convert VBA formulas from VBscript to Javascript. The
formulas I wrote in VBscript, find the first blank row and column in a
Worksheet (in fact, they find the last used row and column).Up to now,
I can't find the right syntax in javascript!
Here are the Vbscript routine which runs well

with excel.activeSheet.Cells
r = .Find("*", .Item(1), , , 1, 2).Row ' 1 for xlByRows, 2 for
xlPrevious
c = .Find("*", .Item(1), , , 2, 2).Column ' 2 for xlByColumns,2 for
xlPrevious
.Range(.Cells(r + 1, 1), .Cells(r + 1, c)).Select
end with

I tried these in javascript but give error :

excel.application.Worksheets("2003EC").Activate;
with (excel.application.ActiveSheet.Cells) {
r = Cells.find("*", Cells(1), , , 1, 2).Row; // 1 for xlByRows, 2 for
xlPrevious
c = Cells.find("*", Cells(1), , , 2, 2).Column; // 2 for xlByColumns,2
for xlPrevious
Range(Cells(r + 1, 1), Cells(r + 1, c)).Select;
}

Is there any Excel web site giving tips for VBA formulas translation to
Javascript (or VBscript)?

Thanks for any help



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
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
Formatting Excel cell through Javascript vinu Excel Discussion (Misc queries) 0 December 11th 09 09:04 PM
link javascript sureshkasi1985 via OfficeKB.com Excel Worksheet Functions 0 June 5th 08 11:47 AM
link javascript sureshkasi1985 via OfficeKB.com Excel Worksheet Functions 0 June 5th 08 11:44 AM
Javascript Question jmkratt New Users to Excel 1 August 22nd 06 09:02 AM
query page with javascript Rhonda[_2_] Excel Programming 0 September 23rd 03 10:57 AM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"