I am exporting a query to an Excel sheet and I need to customize the foramtting of the myXL.xls file. I used the 'help menu' for a start and this is my code, which doesn't format anything! Never used VBA before so if Im referencing completely wrong, that's why....
Dim MyXL As Object
Set MyXL = GetObject("C:\My Documents\filename"
MyXL.Parent.Visible = True
MyXL.Windows(1).Visible = True
MyXL.Range("A1".Select
MyXL.Selection.EntireRow.Insert
MyXL.Range("A4:F4".Select
With MyXL.Selection.Interior
.Pattern = MyXL.xlSolid
.ColorIndex = 15
End With
etc....
I also *attempt* to enter Excel into the Running Object table if it's not running, which doesn't work either. Any help will be appreciated.
hpg
Dim MyXL As Object
Set MyXL = GetObject("C:\My Documents\filename"
MyXL.Parent.Visible = True
MyXL.Windows(1).Visible = True
MyXL.Range("A1".Select
MyXL.Selection.EntireRow.Insert
MyXL.Range("A4:F4".Select
With MyXL.Selection.Interior
.Pattern = MyXL.xlSolid
.ColorIndex = 15
End With
etc....
I also *attempt* to enter Excel into the Running Object table if it's not running, which doesn't work either. Any help will be appreciated.
hpg