I have worked with vba for the last year or so and understand a little. For the last two months I have been working on a scheduling template for my restaurants. Currently, it is working great. Most stores are now asking for the ability to be able to compare actual hours worked with scheduled hours either from up to the date aspect or weekly aspect after the week has finished. I can set a connection string to to file I need but this won't work as the dates change with each week. We are using an Aloha POS that creates grind files for each completed day. My question is:
I need to be able to create a macro that will be initiated by the user pressing a button that will start with a preset Sunday's date and then count backwards for each day stopping on Monday to pull the needed file for each day, convert the dbf to .xls and then paste the file into an excel worksheet. Each day will be posted to a separate sheet for the corresponding day of the week. From here, I can do the rest to set formulas to compare the data. I have worked a lot with vba but never attempted to do this so I don't have any current code as I don't know where to start. The code needs to use Sunday's date as the starting point so each week it pulls the correct data from the correct day. Also, if they are checking before the week or grind files have completed, I need to not error out if the day does not exist yet. The path will be C:\Aloha\dated subdirectory(format is "20090401"\GNDTIME.dbf.
Any help will be greatly appreciated. If I have not been specific or if you need more info please let me know.
I need to be able to create a macro that will be initiated by the user pressing a button that will start with a preset Sunday's date and then count backwards for each day stopping on Monday to pull the needed file for each day, convert the dbf to .xls and then paste the file into an excel worksheet. Each day will be posted to a separate sheet for the corresponding day of the week. From here, I can do the rest to set formulas to compare the data. I have worked a lot with vba but never attempted to do this so I don't have any current code as I don't know where to start. The code needs to use Sunday's date as the starting point so each week it pulls the correct data from the correct day. Also, if they are checking before the week or grind files have completed, I need to not error out if the day does not exist yet. The path will be C:\Aloha\dated subdirectory(format is "20090401"\GNDTIME.dbf.
Any help will be greatly appreciated. If I have not been specific or if you need more info please let me know.