View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Insert Column into active Excel Sheet from Access

I assume you are using a macro to export; Ofcourse you need to refer to the
Excel application object...to access activesheet.

"Jacob Skaria" wrote:

Do you mean

Sub Macro1()
ActiveSheet.Columns(7).Insert
ActiveSheet.Range("G1") = "Title"
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Imran J Khan" wrote:

Hello,
I have an Access application that exports several different data sets
(reports) to Excel. However, I need to insert in one worksheet a calculated
column G (Column G = ColumnE/ColumnF). The worksheet goes upto M, so column G
already has data that needs to be shifted one column to the right. I also
need have a need title for Column G.
The other reports do not require this, so I do not want to change our
standard Access function that creates worksheets. I need to insert column G
after the Access function has finished creating the worksheet. The Workbook
and Worksheet should be the active ones. The name of the worksheet will be
always be the same for this report, but the workbook name will vary
("Book1","Book2",etc).
I would appreciate any help on how to do this.