I have been trying to manipulate Excel files with only VBScript code. It's a stand-alone VBScript that is opening and closing excel files. Problem is with Range(Selection, Selection.End(xlDown)).Select
code. When I run this code in excel macro it is selecting all rows with continuous data in a particular cell. As I want it to do. Problem is when i try to run this code from VBScript. Type of file is .vbs
I have created Excel object: Set objExcel = CreateObject("Excel.Application")
inside the script. and code objExcel.Range("A5").select
is selecting the right cell. But objExcel.Range(Selection, Selection.End(xlDown)).Select
is doing nothing. It is the same functionality when you hold shift + ctrl
and press down arrow in excel. When I record macro in excel and run it there are also no problems, the same code is running in VBA normally. Rows are getting selected. Only issue is when I convert that code to stand-alone VBScript that nothing is happening.
I need a way to select continuous cells with data in it. Same like ctrl+shift
+ down,up,left,right. If you know any other way of achieving it I'm OK with it.