H
Harry
Hi:
I have a project in which I use Access to create, then export into an
Excel spreadsheet some data.
Problems:
1)I need to format the eXcel spreadsheet so that columns are displayed at
the width of the widest text (right now I have to manually do this)
2)I want to insert a column before column 1, and in those cells, insert an
incremental counter.
I have tried using code similar to this but cannot get to a range object
in order to create the column.
dim myapp as object
set myapp as new excel.application
dim myworkbook as workbooks
set myworkbook = workbooks.open("h:\filename.xls") <- this line causes a
type mismatch error... why?
dim mysheet as sheet
set mysheet = myworkbook.sheets(1)
dim myrange as range
set myrange = mysheet.columns(1)
I can figure out how to insert the column.. but cannot build the link to
the range object that will allow me to do it. Why?
Thanks,
Harry
I have a project in which I use Access to create, then export into an
Excel spreadsheet some data.
Problems:
1)I need to format the eXcel spreadsheet so that columns are displayed at
the width of the widest text (right now I have to manually do this)
2)I want to insert a column before column 1, and in those cells, insert an
incremental counter.
I have tried using code similar to this but cannot get to a range object
in order to create the column.
dim myapp as object
set myapp as new excel.application
dim myworkbook as workbooks
set myworkbook = workbooks.open("h:\filename.xls") <- this line causes a
type mismatch error... why?
dim mysheet as sheet
set mysheet = myworkbook.sheets(1)
dim myrange as range
set myrange = mysheet.columns(1)
I can figure out how to insert the column.. but cannot build the link to
the range object that will allow me to do it. Why?
Thanks,
Harry