Ask Question Forum:
C
O
M
P
U
T
E
R
2
8
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Y-position of the mouse cursor
Attachment:===
Inserting a column in excel sheet from vb.net

aWorkSheet.Columns("B:B").Select()
aWorkSheet.Selection.Insert(Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove)
That was it. In the bginning of my code I had the following
myExcel = New Excel.Application
When I attempted to use xlright, I had it coded as Excel.xlRight instead of myExcel.xlRight. That's what was giving me the problem. I should have caught it but in this project I've been bouncing between T-SQL, vb.net and Excel so I was bound to get confused. Thanks again.
That was it. In the bginning of my code I had the following
myExcel = New Excel.Application
When I attempted to use xlright, I had it coded as Excel.xlRight instead of myExcel.xlRight. That's what was giving me the problem. I should have caught it but in this project I've been bouncing between T-SQL, vb.net and Excel so I was bound to get confused. Thanks again.