I hope this is the right forum...
I am a code dabling engineer attempting to write vbscript to access Excel from the AS400. Initially I want to be able to activate an Excell worksheet copy a part number and jump back to the AS400 to make changes.
Does anyone know how I can activate the Excell sheet?
So far I have successfully opened an Excell file but since I want to be able to loop through many part numbers I don't want to have to slow things down by opening the Excell file every time.
...one thing I tried
Application.Win dows("Copy down list.xls").Acti vate
... this doesn't work.
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRI PT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
Set objExcel = CreateObject("E xcel.Applicatio n")
objExcel.Visibl e = True
objExcel.Workbo oks.Open ("F:\Copy down List.xls")
objExcel.Cells( 1, 1).Select
objExcel.Active Cell.Offset(1, 0).Select
objExcel.Select ion.Copy
autECLSession.S etConnectionByN ame(ThisSession Name)
autECLSession.a utECLPS.SendKey s "[edit-paste]"
autECLSession.a utECLPS.SendKey s "[enter]"
Any help would be greatly appreciated. It will save me hours of manual entry!
I am a code dabling engineer attempting to write vbscript to access Excel from the AS400. Initially I want to be able to activate an Excell worksheet copy a part number and jump back to the AS400 to make changes.
Does anyone know how I can activate the Excell sheet?
So far I have successfully opened an Excell file but since I want to be able to loop through many part numbers I don't want to have to slow things down by opening the Excell file every time.
...one thing I tried
Application.Win dows("Copy down list.xls").Acti vate
... this doesn't work.
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRI PT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
Set objExcel = CreateObject("E xcel.Applicatio n")
objExcel.Visibl e = True
objExcel.Workbo oks.Open ("F:\Copy down List.xls")
objExcel.Cells( 1, 1).Select
objExcel.Active Cell.Offset(1, 0).Select
objExcel.Select ion.Copy
autECLSession.S etConnectionByN ame(ThisSession Name)
autECLSession.a utECLPS.SendKey s "[edit-paste]"
autECLSession.a utECLPS.SendKey s "[enter]"
Any help would be greatly appreciated. It will save me hours of manual entry!