Thread: Command Button
View Single Post
  #3   Report Post  
Jack Gillespie
 
Posts: n/a
Default

Cindy-Thanks for your response. The code is very simple and this snippet
shows how the buttons and subs are being renamed:


Private Sub btnDueDate_Click() 'Intial value
ActiveDocument.Tables(1).Select
ActiveDocument.Tables(1).Sort excludeheader, 5
End Sub

Private Sub btnDueDate1111_Click() ' renamed value after the command button
has been clicked 4x.

End Sub


"Cindy M -WordMVP-" wrote:

Hi ?B?SmFjayBHaWxsZXNwaWU=?=,

I have a 7 column table that I want to users to sort by clicking a command
button in the header row. It works fine one time. After clicking the
command button the names of the buttons are changed. If the button name is
"btnItems" it now becomes "btnItems1" or "btnItems11" depending on the number
of times it is clicked.

Does anyone know why this is happening and what I can do to stop it?

Can't even begin to guess without seeing the code it's running. Sounds, though,
like it's being removed, then recreated...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)