ChrisBrown
New Member
- Joined
- Apr 8, 2021
- Messages
- 3
- Office Version
- 2016
- 2010
- Platform
- Windows
Hi, Please be gentle this is my first post on here.
I have an Excel Spreadsheet (XLSM) which imports data from a database using named ranges. All but one work perfectly well.
The problem lies in one which is importing a table of data, starting from a particular cell. When the import is run the formats is applied correctly to the imported data. However the format is also applied to another sheet in the workbook and this is causing a problem for the remainder of the calculations. Even more strangely on the format for the first column is copied.
I have checked all named ranges and all data validations to ensure there is no cross over and also deleted the offending sheet, named range and recreated (with different names) - nothing seems to work
Any thoughts on what may be causing this? Is more info needed?
The offending code is
Range(nm.Name).CopyFromRecordset adoRs
adoRs contains the data.
nm is the name of the range which in this case is "Prices!$B$4"
The sheet where the format is changing is called "Inputs"
I have an Excel Spreadsheet (XLSM) which imports data from a database using named ranges. All but one work perfectly well.
The problem lies in one which is importing a table of data, starting from a particular cell. When the import is run the formats is applied correctly to the imported data. However the format is also applied to another sheet in the workbook and this is causing a problem for the remainder of the calculations. Even more strangely on the format for the first column is copied.
I have checked all named ranges and all data validations to ensure there is no cross over and also deleted the offending sheet, named range and recreated (with different names) - nothing seems to work
Any thoughts on what may be causing this? Is more info needed?
The offending code is
Range(nm.Name).CopyFromRecordset adoRs
adoRs contains the data.
nm is the name of the range which in this case is "Prices!$B$4"
The sheet where the format is changing is called "Inputs"