excel - VBA Class with Static Variables -
i'm running issue. i'm trying define couple variables used in several methods in class module.
i keep getting invalid outside procedure
error.
can point me in right direction? feel scope issue but, i'm unsure on how validate this.
' class file_ops ' attributes private pdb_file string private pdb_path string pdb_file = "db.xlsx" pdb_path = thisworkbook.path + "\" public sub open_db(pdb_file, pdb_path) workbooks.open filename:=pdb_path + pdb_file end sub public sub close_db(pdb_file) pdb_file.close savechanges:=false end sub
Comments
Post a Comment