Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to create a table using a module because the database will
only exist for it to process. It appears that the syntax is coded correctly but I keep getting an error: Object Variable or With block not set. I don't want to use the with block because I need to eventually do late binding. Any suggestion are appreciated. Dim dbs As Database Dim tdf As TableDef Set tdf = dbs.CreateTableDef("tbl_RiskMK") tdf.Fields.Append tdf.CreateField("Region", dbText) tdf.Fields.Append tdf.CreateField("Sector", dbText) tdf.Fields.Append tdf.CreateField("Business", dbText) tdf.Fields.Append tdf.CreateField("EventCategory", dbText) tdf.Fields.Append tdf.CreateField("Qtr_Yr", dbText) tdf.Fields.Append tdf.CreateField("NetAmount_USD", dbDouble) tdf.Fields.Append tdf.CreateField("EventRank", dbByte) tdf.Fields.Append tdf.CreateField("BusinessRank", dbByte) dbs.TableDefs.Append tdf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run time error 1004 general odbc error excel 2003 vba | Excel Programming | |||
Urgent!!! Run-time error '-2147024770 (8007007e)' Automation error | Excel Programming | |||
Error handling error # 1004 Run-time error | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |