Form Coding Not Running Properly.

T

Texernie1

I have a Publisher (running 2003 SP2) document that I want to have modify a
particular item on different pages depending upon what I select in the drop
down on a form.

I have a userform with a command button and a drop down on it. The code
behind the form acts differently, depending upon the method of running it.

1) Running the code by putting the cursor inside Change_Number and stepping
through (F5 or F8). I see "I Run", "I Run3", and "I Run2". The drop down is
populated correctly, when I press the command button, I see "I Run4" and the
code executes correctly. The code stops when it encounters the "Stop" command.

2) Running the code by running it through the menu in Publisher, I see "I
Run" and "I Run2". The drop down is not populated correctly and nothing
happens when I press the command button. The code never enters tracing mode
when it encounters the "Stop" command.

Has anyone see this type of behavior before? Does anyone have any ideas on
how to correct the problem?

TIA
TexErnie1

(In Module1)
Sub Change_Number()

Stop

MsgBox ("I run")
Load PhoneNumbers
MsgBox ("I run2")
PhoneNumbers.Show

End Sub

(The Code behind PhoneNumbers)
Private Sub CommandButton1_Click()

MsgBox ("I Run4")

Phone = Me.ComboBox1.Value

'Stop

ThisDocument.Pages(1).Shapes.Item("WordArt 56").TextEffect.Text = Phone

'For Each I In ThisDocument.Pages(1).Shapes
'Stop
' Debug.Print I.Name
'Next I

Unload Me

End Sub


Private Sub UserForm_Initialize()

'Stop
MsgBox ("I Run3")

Me.ComboBox1.Clear

Me.ComboBox1.AddItem "xxx-xxx-xxxx"
Me.ComboBox1.AddItem "xxx-xxx-xxxx"
Me.ComboBox1.AddItem "xxx-xxx-xxxx"
Me.ComboBox1.AddItem "xxx-xxx-xxxx"
Me.ComboBox1.AddItem "xxx-xxx-xxxx"
Me.ComboBox1.AddItem "xxx-xxx-xxxx"


End Sub
 
T

Texernie1

Has anyone seen this issue bofore or been able to duplicate it?

Regards,
Texernie1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top