- How can I evenly distribute small boards of lumber to make a bigger board?
- What would happen if corporations can only make a maximum profit of 10% per product.
- Marxist Economics: Understanding Capitalist Exploitation through “speed up” or increase in intensity
- Emacs execute keymap entry
- Running elisp within an orgmode code block
- How can I ask a user to choose from a list of options, while showing her a long list with extra metadata?
- Protection against h-bomb core explosion conditions thinkable?
- Will a race survive eugenics?
- How would Soldiers with Indestructable bones fight?
- How fast can I flood the Netherlands entirely and permanently?
- A planet with 7 suns
- What effect could drop the freezing temperature of water globally to −40 Celsius?
- Is life in a planet in this solar system possible?
- What are the limits of energy density?
- What are the benefits of reciting Durga Saptashati Devi Aparadha Kshamapana Stotram?
- Fetters in samsara
- Craft Commerce Plugin - How to refresh/reload/redirect page in onStatusChange
- How can I prevent an account activation email from being sent to an unverified user who registered via a front end registration form?
- This is it. This is the one. Find your wife
- What's the name of my cat?
Creating an index for an existing field in an Excel table using VBA Code
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:
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")
.Primary = True
TD.Indexes.Append ind '<-error occurs here