#1
|
||||
|
||||
VBA is conflatng vx and ox!
Ok, this is weird. I'm writing a VBA program, and part of it looks like this:
Code:
Set StdXcts = New Collection For Each oxct In oTSS.Xcts bs = (InStr(oxct.Handles, vh) > 0) oxct.bStd = bs If bs Then vx = oxct.Name Set ox = New Obj2 StdXcts.Add ox, vx ox.Name = vx End If Next oxct I stopped the debugger and tried again. I closed the workbook, reopened it and tried again. I closed Excel, then restarted it and tried again. I disconnected from the client machine, reconnected, restarted Excel and tried again. Finally I disconnected, rebooted my own PC and tried again. It's still doing it. So I conclude it's not some temporary difficulty; either it's a bug in the latest version of Excel or my workbook is corrupted. But before I start trying anything extreme, can anyone imagine any other explanation? Is there anything I could possibly have done earlier in the program that accidentally created an equivalence between vx and ox, for instance? ...Oh, forgot to mention: I tried changing one of the variable names (from ox to oo) and it works! Last edited by BobBridges; 03-31-2020 at 02:12 PM. Reason: Forgot to say... |
Thread Tools | |
Display Modes | |
|