hexagon logo

VB PCDMIS & Excel with Copy-PasteSpecial and Skip Blanks

Anyone have any luck with VB and getting the SkipBlanks:=True to work when copying one set of cells of a spreadsheet to another spreadsheet?

Basicially what I am doing is having PC-DMIS export data into a CSV using the File I/O commands. (I can customize it better this way). Then I run a script to save that CSV as an XLSX. Then it opens that new XLSX, copies a set of cells, then pastes that into a dedicated spot on a master Excel spreadsheet.

I can get the numbers to paste exactly where I need them to go, however this doesn't seem to want to skip the blanks. The reason why I need skip blanks is because there are formulas on the master sheet that I need to skip over.


row = 38
column = 42

Pasterange = "C" & row & ":" & "AO" & column

xlSheet3.Range(Pasterange).Select 

xlSheet3.Range(Pasterange).PasteSpecial SkipBlanks:=True, Paste:=xlPasteValues 



Do I need to have a different method of assigning the skip blanks?
Parents Reply Children
No Data