I’ve been attempting to create an index for an existing field in an Excel table on a worksheet named “CUS_ID-CHANNEL3”. There are two columns in the table; “CUS_ID” and “CHANNEL”
The table (purely for experimental purposes) looks like this:
CustA Business Services
CustB Business Services
CustC Business Services
CustD Business Services
I would like to create an index for the CUS_ID field.
Here’s the code I’ve attempted to use:
Sub CreateIndex() Dim DBS As DAO.Database Dim DBSRS As DAO.Recordset Dim TD As DAO.TableDef Dim ind As DAO.Index Set DBS = OpenDatabase("X:\Rowan\Bad Debt Provision\Bad Debt Provision Tool.xlsm", False, True, "Excel 8.0;") Set TD = DBS.TableDefs("'CUS_ID-CHANNEL3$ '") Set ind = TD.CreateIndex("PrimaryKey") With ind .Fields.Append .CreateField("CUS_ID") .Primary = True End With TD.Indexes.Append ind '<-error occurs here DBS.Close End Sub
The table seems to read perfectly but I get run-time error 3251; “Operation is not supported for this type of object” when it tries to run the “TD.Indexes.Append ind” line. I suspect my naming of the index field as “CUS_ID” in an attempt to make it apply the index to the “CUS_ID” column of my table is probably futile, but I was influenced by another example I saw online where I couldn’t work out how the index was applied to a specific field in the Excel table.
Any help with this is much appreciated.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!