I do not think your answer to your first post is correct, at least syntex-wise.
This issue could be because of using VB.NET without set "Option Strict" flag: you declared a "Shared" variable at class level "rpsToolps" as Nothing, then in the If...Then... you declared another local variable also named as "rptToolps" (if you use C#, this would not be allowed, and then you would have noticed your error immediately), that was why your own answer was to move "rpsToolps.Visible=True" inside the If...Then... statement and it seemed working. The net effect of your "solution" is that you never have a Shared class-level reference pointing to an instance of your PaletteSet, and each time you run your command, a new instance of the PaletteSet is created. Since when user clicking "x" to close PaletteSet does not actually dispose it but simply sets it to invisible, running your command multiple times would create many instances of the PaletteSet with all previously opened PaletteSets sitting in memory as invisible, useless garbage, you are creating a case of "memory leak" inside AutoCAD process.
The correct way is to change (inside the If...Then...End If)
Dim rpsToolps As New Autodesk.AutoCAD.Windows.PaletteSet(toolPaletteGroupName)
to
rpsToolps = New Autodesk.AutoCAD.Windows.PaletteSet(toolPaletteGroupName)
and leave
rpsToolps.Visible = True
outside the If...Then..., as you did originally.