473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Insert Column in Excel in VB .NET

Unable to Shift Excel Colums to the Right.

Portion of my current VB .NET code is:

Dim oXL As Excel.Application
Dim oWBook As Excel.Workbook
Dim oWSheet As Excel.Worksheet
Dim oRng As Excel.Range
Dim oCell As Excel.Range
..
..
I have code here that successfully opens the excel file
consisting of one Workbook and one Worksheet
..
..
..
At this point I want to insert a Column in "A"
and cause all Columns to shift to the right.

Can you help me?

Thanks

Jan 9 '06 #1
1 6137
On 9 Jan 2006 08:49:25 -0800, km*******@yahoo.com wrote:

¤ Unable to Shift Excel Colums to the Right.
¤
¤ Portion of my current VB .NET code is:
¤
¤ Dim oXL As Excel.Application
¤ Dim oWBook As Excel.Workbook
¤ Dim oWSheet As Excel.Worksheet
¤ Dim oRng As Excel.Range
¤ Dim oCell As Excel.Range
¤ .
¤ .
¤ I have code here that successfully opens the excel file
¤ consisting of one Workbook and one Worksheet
¤ .
¤ .
¤ .
¤ At this point I want to insert a Column in "A"
¤ and cause all Columns to shift to the right.
¤
¤ Can you help me?

Have you tried using the Macro Recorder in Excel to help you generate the code?
Paul
~~~~
Microsoft MVP (Visual Basic)
Jan 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: yaya via DotNetMonster.com | last post by:
Hi all, I need to add a new column in an excel file,I have tried the query below and it doens't work... strCom = " ALTER TABLE ADD COLUMN Phone INTEGER "; Anyone know the query to add a new...
2
by: Geoffrey KRETZ | last post by:
Hello, I'm wondering if the following behaviour is the correct one for PostGreSQL (7.4 on UNIX). I've a table temp_tab with 5 fields (f1,f2,f3,...),and I'm a launching the following request :...
8
by: carlospedr | last post by:
I have to insert data from about 30 tables into a single table (Users), to do so i used a cursor and a bit of dynamic sql, this should work fine if the tables have to do the select from had the...
2
by: mivey4 | last post by:
Okay I have 2 tables: Table A - holds a list of new hardware serial numbers and their corresponding model (no constraints or indexes) Table B - holds a distinct list of current serial numbers...
4
by: Bob | last post by:
Hi all, I'm trying to import data, modify the data then insert it into a new table. The code below works fine for it but it takes a really long time for 15,000 odd records. Is there a way I...
0
by: grego9 | last post by:
I am trying to insert a new blank row above any row in my excel spreadsheet that has the text "NO" in column O. The macro I have written (below) works fine - apart from when there are two or three...
6
by: grego9 | last post by:
I am trying to write some code to get Excel 2000 to insert a blank row wherever there is a "NO" in column O (above the NO). The code below nearly does this - but not quite!. The problem I have is...
1
by: veer | last post by:
hello expert i want to insert the date in one column of excel sheet but the date should be one which i enter in vb form e,g i have a column name Date and i want to show the date which i select...
1
by: pexp | last post by:
Hello All, I would like to insert/update a database table using excel file. I have a list of products in an excel file. If product exist in a database table tblproduct than it should update the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.