Hello Mr. Excel People,
I am trying to create an access database through excel, and am using vba to manually add these parts to the db. I am trying to create a table that has variable fields. The names, types, and number of these fields will be different depending on the spreadsheet that is entered. The standard create table statement:
just doesn't seem to allow for variable changes. What I would like to have happen is for vba to read the header cells and store these values as the name. (Instead of [Name], [XYZ Co. Emp ID]. Is this possible? Or will I need to make certain everything is standard and hard code this in vba?
Thanks for any help you may provide!
I am trying to create an access database through excel, and am using vba to manually add these parts to the db. I am trying to create a table that has variable fields. The names, types, and number of these fields will be different depending on the spreadsheet that is entered. The standard create table statement:
Code:
.Execute "CREATE TABLE tblSample ([Name] text(50), " & _
"[Address] text(150), " & _
"[City] text(50), " & _
"[ProvinceState] text(2), " & _
"[Postal] text(6), " & _
"[Account] decimal(6))"
Thanks for any help you may provide!