The code inserts a worksheet, names this worksheet, and then imports data to this sheet. The added sheet is there, but I am renaming an existing worksheet instead of the added sheet. The imported data would overlay this sheet if I allowed it to continue. Here is the code snippet:
[vba] Sheets.Add
Sheets(Sheets.Count).Select
shName = BldName(impType)
Sheets(Sheets.Count).Name = shName [/vba]
I assumed that the added sheet would be the "last" sheet (highest number or "Count"). This is NOT the case. How do I name this added sheet? FYI: BldName is a macro that constructs this name, and it is working properly (I displayed the constructed name).