21 posts in this topic
at first: i'm new here, so please forgive me my mistakes, and show them to me, just that i can learn to do better in the future.
Now to my Problem: i have an excel sheet, where i just need some columns for further actions, but i have no idea how to add single columns to a new array.
I found the following code(the one i just added as a file) from 'water' in this forum, but i wont get how i could add multiple columns into a new array.
The biggest problem in my situation is that i dont know the count of the rows i need for the array, i just got a fix number of rows, which is 4.
Hope you can help me, and sry again for this 'unlucky illustration'.
btw: how can i add code shown as code here, instead of posting it as a attached file?.
i have an error:
==> The requested action with this object has failed.: $iRowCount = .Range(.Cells(1, 1), .Cells($oRangeLast.Row, $oRangeLast.Column)).Rows.Count $iRowCount = .Range(^ ERROR
My code is:
$oRangeLast = .UsedRange.SpecialCells($xlCellTypeLastCell) Sleep(1000) $iRowCount = .Range(.Cells(1, 1), .Cells($oRangeLast.Row, $oRangeLast.Column)).Rows.Count Sleep(1000) _Excel_RangeWrite($oWorkbook_1, $oWorkbook_1.ActiveSheet,$aFileList[$i] , "AB3:AB"&$iRowCount) I have added some sleep because the application was crashing more often before, so i thought to slow down the code execution.
But i didn't solve the issue.
Has anyone an idea of what the problem might be?
Thanks in advance.
Extensive library to control and manipulate Microsoft Excel charts.
Written by GreenCan and water.
Theads: General Help & Support - Example Scripts
BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
KNOWN BUGS (last changed: 2017-07-21)
None. The COM error handling related bugs have been fixed.
i have a problem with the deletion of an empty row in Excel.
If $vRow_2 = "" Then _Excel_RangeDelete($oWorkbook_1.ActiveSheet,"2", $xlShiftUp,1) EndIf I want to delete the second row. $vRow_2 is an empty cell, "A2".
After running the code, the second row is not deleted.
I have tried also:
If $vRow_2 = Null Then _Excel_RangeDelete($oWorkbook_1.ActiveSheet,"2", $xlShiftUp,1) EndIf But it doesn't work.
Thanks in advance.