I have two question I would be grateful of some help with.
1) I have a query that I'm exporting to Excel using the transferspreadsheet method. This works fine apart from I keep getting randon errors when the code reaches the format part. Eg
exApp.Rows("1:1").Select
Selection.RowHeight = 35 -- On this line I get an error.
But sometimes it works others it does not. Is there a way to solve this. ??
2) My second question is how do I set up a loop so I only format the correct number of cells to match the number of records in the query. ??
Thanks in advance.
1) I have a query that I'm exporting to Excel using the transferspreadsheet method. This works fine apart from I keep getting randon errors when the code reaches the format part. Eg
exApp.Rows("1:1").Select
Selection.RowHeight = 35 -- On this line I get an error.
But sometimes it works others it does not. Is there a way to solve this. ??
2) My second question is how do I set up a loop so I only format the correct number of cells to match the number of records in the query. ??
Thanks in advance.