I am writing a large amount of data from an Access database to a spreadsheet.
I have an area of formatting within the code which sets various Ranges and then I Merge columns, set Interior colours, set Borders, and set Column Widths.
Initially I tried to do this use 'With Selectuion ... End With' but found that the output Merging was very random. So I use this at the top of my formatting code (all objects are dimensioned)
Then I do the following:Please Login or Register to view this content.
Then the problem code:Please Login or Register to view this content.
This just doesn't work properly. The pane freezes on Column E.Please Login or Register to view this content.
I changed the range to G1, H1, A1, B1 etc. and it sys on Coloumn E.
I remmed out the 'ObjSht.Range("F1").Select' line and it made no difference.
I remmed out the 'ObjEXL.ActiveWindow.FreezePanes' line and it didn't freeze the pane (expected).
I've tried omitting 'ObjEXL' and the result is the same.
I'm hours into this and cannot resolve it. Can anybody help please?
Bookmarks