Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi guys I have a program written in VB.Net that manipulate an XLS file usin VBA. I have to delete some lines: ows.Range("119.190").Delete("Shift:=" & -4162) -4162 is the real value of xlUp It raise me this exeption: Delete method of Range class failed Previously, I tried this: ows.Select("119.190") oEx.selection").Delete("Shift:=" & -4162) The problem persist. Any idea? Thank you in advance -- dan_code ----------------------------------------------------------------------- dan_coder's Profile: http://www.excelforum.com/member.php...fo&userid=3668 View this thread: http://www.excelforum.com/showthread.php?threadid=56418 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you are using early binding, you can use xlShiftUp.
But shouldn't the Range be written as Range("119:190"). Also, Shift:= is a named argument and as such should not be in quotes, as you are really passing on the number -4162, not the string <"Shift:=" & -4162. A further point, the brackets after "Delete" should not be there as you are not using the return value. Unless these points above are not valid in the .Net environment. NickHK "dan_coder" wrote in message ... Hi guys I have a program written in VB.Net that manipulate an XLS file using VBA. I have to delete some lines: ows.Range("119.190").Delete("Shift:=" & -4162) -4162 is the real value of xlUp It raise me this exeption: Delete method of Range class failed Previously, I tried this: ows.Select("119.190") oEx.selection").Delete("Shift:=" & -4162) The problem persist. Any idea? Thank you in advance! -- dan_coder ------------------------------------------------------------------------ dan_coder's Profile: http://www.excelforum.com/member.php...o&userid=36685 View this thread: http://www.excelforum.com/showthread...hreadid=564187 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select method of range class failed | Excel Programming | |||
"delete method of range class failed | Excel Programming | |||
Delete method of Range class failed - HELP!!! | Excel Programming | |||
runtime error '1004' delete Method of Range Class Failed | Excel Programming | |||
runtime error '1004' delete Method of Range Class Failed | Excel Programming |