G
Guest
Hi.
I have a spreadsheet that is pulled from another program I have no control
over. This spreadsheet needs to be imported into a database I maintain in
Access.
I have a table set up for this purpose. My problem arises in that the Excel
sheet has excess blank rows and several others portions that need to be
removed. I have some code to deal with this:
Sub Adjust_Objects()
Rows("1:3").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").ColumnWidth = 12.29
Columns("J:J").ColumnWidth = 24
Columns("K:K").Select
Range("K192").Activate
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Range("G192").Activate
Selection.Delete Shift:=xlToLeft
Rows("190:191").Select
Selection.Delete Shift:=xlUp
Range("A2").Select
End Sub
That said, is there a way I can run this code on the sheet through Access
then have the correctly adjusted sheet imported into my table?
Still somewhat new to VB.
Any help would be greatly appreciated.
Thanks
I have a spreadsheet that is pulled from another program I have no control
over. This spreadsheet needs to be imported into a database I maintain in
Access.
I have a table set up for this purpose. My problem arises in that the Excel
sheet has excess blank rows and several others portions that need to be
removed. I have some code to deal with this:
Sub Adjust_Objects()
Rows("1:3").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").ColumnWidth = 12.29
Columns("J:J").ColumnWidth = 24
Columns("K:K").Select
Range("K192").Activate
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Range("G192").Activate
Selection.Delete Shift:=xlToLeft
Rows("190:191").Select
Selection.Delete Shift:=xlUp
Range("A2").Select
End Sub
That said, is there a way I can run this code on the sheet through Access
then have the correctly adjusted sheet imported into my table?
Still somewhat new to VB.
Any help would be greatly appreciated.
Thanks