If you check at the top of your code, you can have 2 statements

1. Private sub....
2. Sub RDB_workbook....

Remove the 2nd line, then the error will stop.