Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2014, 10:25 AM
EnigmaMatter EnigmaMatter is offline Error 6124 on User (NOT DEVELOPER) Machine Windows 7 32bit Error 6124 on User (NOT DEVELOPER) Machine Office 2010 32bit
Novice
Error 6124 on User (NOT DEVELOPER) Machine
 
Join Date: Sep 2014
Posts: 6
EnigmaMatter is on a distinguished road
Default Error 6124 on User (NOT DEVELOPER) Machine


Hello All,

I have the following code in a UserForm and it works perfectly on the Developer (my) machine:

Code:
Private Sub CashANDCreditButton_Click()
Dim WD As Word.Document
    Set WD = ActiveDocument

  txtPO = POField.Text
  txtFacility = FacilityField.Text
  txtCity = CityField.Text
  txtST = STField.Text
  txtCreditAmount = CreditAmountField.Text
  txtCashAmount = CashAmountField.Text
  txtLocation = LocationField.Text
  Set WD = ActiveDocument
  With WD
    .SelectContentControlsByTag("POTag").Item(1).Range.Text = txtPO
    .SelectContentControlsByTag("FacilityTag").Item(1).Range.Text = txtFacility
    .SelectContentControlsByTag("CityTag").Item(1).Range.Text = txtCity
    .SelectContentControlsByTag("STTag").Item(1).Range.Text = txtST
    .SelectContentControlsByTag("CashAmountTag").Item(1).Range.Text = "$" & txtCashAmount & " CASH and "
    .SelectContentControlsByTag("CreditAmountTag").Item(1).Range.Text = "$" & txtCreditAmount & " CREDIT"
    .SelectContentControlsByTag("LocationTag").Item(1).Range.Text = txtLocation
End With
Unload Me
End Sub

Private Sub CashButton_Click()

Dim WD As Word.Document
    Set WD = ActiveDocument

  txtPO = POField.Text
  txtFacility = FacilityField.Text
  txtCity = CityField.Text
  txtST = STField.Text
  txtCashAmount = CashAmountField.Text
  txtLocation = LocationField.Text
  Set WD = ActiveDocument
  With WD
    .SelectContentControlsByTag("POTag").Item(1).Range.Text = txtPO
    .SelectContentControlsByTag("FacilityTag").Item(1).Range.Text = txtFacility
    .SelectContentControlsByTag("CityTag").Item(1).Range.Text = txtCity
    .SelectContentControlsByTag("STTag").Item(1).Range.Text = txtST
    .SelectContentControlsByTag("CashAmountTag").Item(1).Range.Text = "$" & txtCashAmount
    .SelectContentControlsByTag("CreditAmountTag").Item(1).Range.Text = ""
    .SelectContentControlsByTag("LocationTag").Item(1).Range.Text = txtLocation
End With
Unload Me
End Sub


Private Sub ClearButton_Click()
POField.Text = ""
FacilityField.Text = ""
CityField.Text = ""
STField.Text = ""
LocationField.Text = ""
CashAmountField.Text = ""
CreditAmountField.Text = ""
End Sub

Private Sub CreditButton_Click()
Dim WD As Word.Document
    Set WD = ActiveDocument

  txtPO = POField.Text
  txtFacility = FacilityField.Text
  txtCity = CityField.Text
  txtST = STField.Text
  txtCreditAmount = CreditAmountField.Text
  txtLocation = LocationField.Text
  Set WD = ActiveDocument
  With WD
    .SelectContentControlsByTag("POTag").Item(1).Range.Text = txtPO
    .SelectContentControlsByTag("FacilityTag").Item(1).Range.Text = txtFacility
    .SelectContentControlsByTag("CityTag").Item(1).Range.Text = txtCity
    .SelectContentControlsByTag("STTag").Item(1).Range.Text = txtST
    .SelectContentControlsByTag("CreditAmountTag").Item(1).Range.Text = "$" & txtCreditAmount & " CREDIT"
    .SelectContentControlsByTag("CashAmountTag").Item(1).Range.Text = ""
    .SelectContentControlsByTag("LocationTag").Item(1).Range.Text = txtLocation
End With
Unload Me
End Sub


Private Sub UserForm_Initialize()
Dim WD As Word.Document
    Set WD = ActiveDocument

POField.Text = WD.SelectContentControlsByTag("POTag").Item(1).Range.Text
FacilityField.Text = WD.SelectContentControlsByTag("FacilityTag").Item(1).Range.Text
CityField.Text = WD.SelectContentControlsByTag("CityTag").Item(1).Range.Text
STField.Text = WD.SelectContentControlsByTag("STTag").Item(1).Range.Text
LocationField.Text = WD.SelectContentControlsByTag("LocationTag").Item(1).Range.Text

End Sub
HOWEVER, if any User/Client uses it, it returns an error 6124 on this line:

Code:
.SelectContentControlsByTag("POTag").Item(1).Range.Text = txtPO
I appreciate any and all help in advance! I have tried to Google and can't find an answer.
Reply With Quote
  #2  
Old 09-11-2014, 04:21 PM
macropod's Avatar
macropod macropod is offline Error 6124 on User (NOT DEVELOPER) Machine Windows 7 64bit Error 6124 on User (NOT DEVELOPER) Machine Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

What is the full text of the error 6124 message? Typically, it's:
Error 6124: You are not allowed to edit this section because it is protected.
That suggests a couple of possibilities:
1. It's being opened from a protected location (e.g. an email attachment); or
2. You have applied editing restrictions to the document and haven't allowed 'everyone' access to the content control concerned.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-11-2014, 05:15 PM
EnigmaMatter EnigmaMatter is offline Error 6124 on User (NOT DEVELOPER) Machine Windows 7 32bit Error 6124 on User (NOT DEVELOPER) Machine Office 2010 32bit
Novice
Error 6124 on User (NOT DEVELOPER) Machine
 
Join Date: Sep 2014
Posts: 6
EnigmaMatter is on a distinguished road
Default

It was the exact example you provided in #1. I was quite frustrated with my users, hah!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 6124 on User (NOT DEVELOPER) Machine FileSystemObject Compile Error: User-Defined Type Not Defined gsrikanth Excel Programming 2 03-28-2022 06:32 AM
Forms Data Using Developer Tab scbarton PowerPoint 1 03-15-2012 09:24 AM
Developer Tab not showing merago Office 1 11-16-2010 01:45 PM
unable to open .RTF files in server machine from client machine Naresh_1210 Word 0 03-12-2010 03:26 AM
MS Office not Currently installed for this user error 25090 sweetczz Office 2 01-24-2006 03:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft