Javascript to VBA
Page 1 of 1 • Share •
Javascript to VBA
Hi Akilesh
Good evening
I am a software developer in C# recently i have got an assignment to convert javascript functions to VBA. to be frank i dont know anything in VB 6.0. there are a bunch of javascript files is there anyway i can get help from you
http://darrenjohnstone.net/2008/07/22/examples-for-the-sharepoint-and-office-live-javascript-api/
you can download his javascript codes. there are about 22 js files in it. can you plz guide me how to convert this
Regards
Stormy
Good evening
I am a software developer in C# recently i have got an assignment to convert javascript functions to VBA. to be frank i dont know anything in VB 6.0. there are a bunch of javascript files is there anyway i can get help from you
http://darrenjohnstone.net/2008/07/22/examples-for-the-sharepoint-and-office-live-javascript-api/
you can download his javascript codes. there are about 22 js files in it. can you plz guide me how to convert this
Regards
Stormy
Last edited by stormchaser on Tue Oct 07, 2008 9:47 pm; edited 1 time in total
stormchaser- Posts: 5
Join date: 2008-10-06
Re: Javascript to VBA
i think its not much difficult than to change to vb script ,you need make some changes only in the basic constructs like if, endif ; for next and so on other things are same if you find any thing difficult just post that portion only

thava- Posts: 3
Join date: 2008-10-04
Age: 27
Location: Madurai,Tamilnadu, india
Re: Javascript to VBA
Hai storm
,
Glad to see you here
and thanx for becoming a member of this form.
First of all I want to say that, I don't know javascript. If you tell me what each line do in javascript, then I can convert it into vb
Here is a link for learning vbscript: VBScript Tutorial
What thava had said is almost right....
When I checked that webpage, I found that most of the lines are easy to convert but except the variables decalred... I think its some built in functions of javascript. I will have a look at it and will soon reply 
-Gud nite
Glad to see you here
First of all I want to say that, I don't know javascript. If you tell me what each line do in javascript, then I can convert it into vb
Here is a link for learning vbscript: VBScript Tutorial
What thava had said is almost right....
-Gud nite

Akhilesh B Chandran- Administrator

- Posts: 26
Join date: 2008-09-29
Age: 19
Location: Trivandrum, Kerala, India

Re: Javascript to VBA
The actual javascript code of the first program:
A small conversion of the first program:
here the first two lines are not converted. I don't know what the function is doing in there. The other lines were converted. Similarly, you can convert the other codes also. If you have any doubts, please feel free to ask
-Gud nite
- Code:
var lists = new SPAPI_Lists('http://localhost')
var listDef = lists.getListAndView('Tasks', '{4011C1CE-A840-4BEB-89E3-A42DF3E3711E}');
if (listDef.status == 200)
{
// The list definition is in listDef.resultNode and is a browser specific XML document
}
else
{
alert('There was an error: ' + listDef.statusText);
}
A small conversion of the first program:
- Code:
var lists = new SPAPI_Lists('http://localhost')
var listDef = lists.getListAndView('Tasks', '{4011C1CE-A840-4BEB-89E3-A42DF3E3711E}');
dim lists
dim listDef
if listDef.status = 200 then
' // The list definition is in listDef.resultNode and is a browser specific XML document
else
document.write("There was an error: " & listDef.statusText)
end if
here the first two lines are not converted. I don't know what the function is doing in there. The other lines were converted. Similarly, you can convert the other codes also. If you have any doubts, please feel free to ask
-Gud nite

Akhilesh B Chandran- Administrator

- Posts: 26
Join date: 2008-09-29
Age: 19
Location: Trivandrum, Kerala, India

Re: Javascript to VBA
Hi Akilesh & Thava
Good to see your reply
today i have converted all the 22 files, its easy to do in vbscript
Thanks 4 u r reply
Best Regards
Stormy
Good to see your reply
Thanks 4 u r reply
Best Regards
Stormy
stormchaser- Posts: 5
Join date: 2008-10-06
Re: Javascript to VBA
U r welcome:)

Akhilesh B Chandran- Administrator

- Posts: 26
Join date: 2008-09-29
Age: 19
Location: Trivandrum, Kerala, India

Permissions of this forum:
You can reply to topics in this forum





