Hi all,
I hope the solution to what I am doing is fairly simple. Basically I am using VBA to create a dynamic spreadsheet. The basic premise of it is that it will take a date from the user (called 'DT') and use that date to search for 3 files in a specific location to open them up. This is to ensure that only the files relating to the date entered by the user are selected, as these files change on a monthly basis and this would aviod any confusion between dates. So far so good - I have got this working.
The main problem that I am having is in copying across information from the 3 opened sheets onto my main spreadsheet. The methodology that I have tried is detailed in the following example:
'opens up the main sheet
Windows("Monitoring_MainSheet.xls"). _
Activate
Sheets("Stability 2").Select
Range("C10").Select
Windows("ATT_*.xls").Activate
'where *denotes the date suffix as entered by user
ActiveCell.FormulaR1C1 = ("=_*.xls!R3C2")
Range("C11").Select
I have also attempted to redefine the user's entered field, but that doesn't work either.
Please let me know if you would like any further details.
I am really desperate for this section of the code to work, as it will solve a lot of issues. Any help advice would be greatly appreciated.
Thanks
I hope the solution to what I am doing is fairly simple. Basically I am using VBA to create a dynamic spreadsheet. The basic premise of it is that it will take a date from the user (called 'DT') and use that date to search for 3 files in a specific location to open them up. This is to ensure that only the files relating to the date entered by the user are selected, as these files change on a monthly basis and this would aviod any confusion between dates. So far so good - I have got this working.
The main problem that I am having is in copying across information from the 3 opened sheets onto my main spreadsheet. The methodology that I have tried is detailed in the following example:
'opens up the main sheet
Windows("Monitoring_MainSheet.xls"). _
Activate
Sheets("Stability 2").Select
Range("C10").Select
Windows("ATT_*.xls").Activate
'where *denotes the date suffix as entered by user
ActiveCell.FormulaR1C1 = ("=_*.xls!R3C2")
Range("C11").Select
I have also attempted to redefine the user's entered field, but that doesn't work either.
Please let me know if you would like any further details.
I am really desperate for this section of the code to work, as it will solve a lot of issues. Any help advice would be greatly appreciated.
Thanks