I have never ever done anything in VBA for excel before. I have my whole dashboard working when the .accdb is in C drive but now i want it in the same folder as excel workbook.
Im getting "Run-time error '424: Object required" for the bottom line below
Dim DatabasePath As String
DatabasePath = CurrentProject.Path & "\SpreadSheetData.accdb"
Why is this? Thanks for your help
There is no CurrentProject in Excel. If you want to refer to the workbook in which the executing code resides, use ThisWorkbook instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With