Jump to content

Vbscript Help..


Recommended Posts

Posted

The below script running and giving result...
sub callexceltable

set msExcel = CreateObject("Excel.Application")
msExcel.Workbooks.Open("C:\TC_Resources_Series4000\Lease4000\ExcelFiles\DataFiles\Lease4000_Configuration.xlsx")
LookupTable = "AssetUserCodes"
Log.message msExcel.Range(LookupTable).Columns.Count
end sub


but when I Execute below one I am getting error.


sub callexceltable

set excelobj = getobject(,"Excel.Application")
workbook = "C:\TC_Resources_Series4000\Lease4000\ExcelFiles\DataFiles\Lease4000_Configuration.xlsx"
Set msExcel = GetObject(Workbook)
callexceltable1(msExcel)
end sub

sub callexceltable1(msExcel)
LookupTable = "AssetUserCodes"
Log.message msExcel.Range(LookupTable).Columns.Count
end sub








so the problem is with when we pass msExcel as a parameter..... anyone please help

Posted

on behalf of pinky

CITI#H@

Posted

[quote name='cherlapalli_jailer' timestamp='1375724235' post='1304068522']
on behalf of pinky

CITI#H@
[/quote]
@3$%

Posted

[quote name='cherlapalli_jailer' timestamp='1375724235' post='1304068522']
on behalf of pinky

CITI#H@
[/quote]

[img]http://4.bp.blogspot.com/-kob3wXGFgYg/UXLMewvA79I/AAAAAAAADJE/0Sx0gqSYP6g/s1600/anasuya13.gif[/img] ltt

Posted

[quote name='IamN0tTrouble' timestamp='1375725200' post='1304068576']
Wt is this kolavari :)
[/quote]
mari endadi?
VB Script Aa range lo vaade vallani ninne choostunna

mari antha ga na ..when whole world is moving to wards OOPS

Posted

[quote name='IamN0tTrouble' timestamp='1375724074' post='1304068511']


but when I Execute below one [color=#ff0000]I am getting error[/color].


[/quote]

You did not mention..what error it is..

However you should read this article..

[url="http://extensiblecad.com/words/2007/10/04/getobject-or-createobject-is-there-a-difference/"]http://extensiblecad.com/words/2007/10/04/getobject-or-createobject-is-there-a-difference/[/url]

Posted

[quote name='hyderabad_vasi' timestamp='1375725272' post='1304068582']


You did not mention..what error it is..

However you should read this article..

[url="http://extensiblecad.com/words/2007/10/04/getobject-or-createobject-is-there-a-difference/"]http://extensiblecad.com/words/2007/10/04/getobject-or-createobject-is-there-a-difference/[/url]
[/quote]

Error iss...

Msexcel object doesn't support range method here

Posted

[quote name='cherlapalli_jailer' timestamp='1375725263' post='1304068579']

mari endadi?
VB Script Aa range lo vaade vallani ninne choostunna

mari antha ga na ..when whole world is moving to wards OOPS
[/quote]

Babu jailer .. Vbscript ke eee range lo kastapadutunte ika oops gurinchi cheppu :(

Posted

[quote name='IamN0tTrouble' timestamp='1375725499' post='1304068608']
Babu jailer .. Vbscript ke eee range lo kastapadutunte ika [b]oops[/b] gurinchi cheppu :(
[/quote]
chaala easy vayya

error handling quite good in oops concepts..

scripting languages very tough to handle errors

Posted

[quote name='cherlapalli_jailer' timestamp='1375725663' post='1304068623']

chaala easy vayya

error handling quite good in oops concepts..

scripting languages very tough to handle errors
[/quote]
Java nerchukumdamani one year nunchi anukuntunna but munduku kadaladam ledu vayyaa

Aa madya try chesthe installation daggare dobbindi oops

Posted

[quote name='IamN0tTrouble' timestamp='1375724074' post='1304068511']
The below script running and giving result...
sub callexceltable

set msExcel = CreateObject("Excel.Application")
msExcel.Workbooks.Open("C:\TC_Resources_Series4000\Lease4000\ExcelFiles\DataFiles\Lease4000_Configuration.xlsx")
LookupTable = "AssetUserCodes"
Log.message msExcel.Range(LookupTable).Columns.Count
end sub


but when I Execute below one I am getting error.


sub callexceltable

set excelobj = getobject(,"Excel.Application")
workbook = "C:\TC_Resources_Series4000\Lease4000\ExcelFiles\DataFiles\Lease4000_Configuration.xlsx"
Set msExcel = GetObject(Workbook)
callexceltable1(msExcel)
end sub

sub callexceltable1(msExcel)
LookupTable = "AssetUserCodes"
Log.message msExcel.Range(LookupTable).Columns.Count
end sub

so the problem is with when we pass msExcel as a parameter..... anyone please help
[/quote]


msgbox petti choosava msExcel emi return chesthondo first procedure lo (sub callexceltable)?
Tell me what it returns.

Nuvvu inthaki em cheddam anukuntunnavo sarigga cheppu. anni mukkalu mukkaluga undi nee code. no definite output. clear ga define cheyyi em kaavalo.

Posted

Check here if you need anymore details on VBScript : [url="http://www.robvanderwoude.com/vbstech.php"]http://www.robvanderwoude.com/vbstech.php[/url]

×
×
  • Create New...