Results 1 to 9 of 9

Thread: Automation Error... maybe cause by Textbox in Userform

  1. #1

    Automation Error... maybe cause by Textbox in Userform



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    I have this problem with my vba coding, where I have this Automation Error when I execute my Userform.

    After trying to figure the cause of the problem, it seem when I try to push some value in cells into the some textbox this Automation Error occurs when executing.

    What is the problem? I use the same code format to push value in cells in another textbox but it working fine.

    Even when I make a new textbox this problem didn't solve.

    This problem only occurs when you put new textbox in the Tab 'Interval Inspection' and make a code TextBox110.Text = Sheets("RuleSetup").Range("P16").Value to push the value from Cells P16 into the text box. Click the button 'Edit Rule', close the userform and save the excel file. The next time you open the excel file and click the button 'Edit Rule', Automation Error will occurs.

    I uploaded the file.

    Automation Error.xlsm

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    751
    Articles
    0
    Excel Version
    Excel 2010 64bit
    I believe that should be

    Me.TextBox110.Text = Sheets("RuleSetup").Range("P16").Value

  3. #3
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    751
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Fahmieyz, I see you didn't bother to read the posting rules on numerous sites.

    Would it bother you too much to at least acknowledge whether or not the above post rectified the situation?
    It did on my computer, did it on yours?

  4. #4
    Quote Originally Posted by NoS View Post
    Fahmieyz, I see you didn't bother to read the posting rules on numerous sites.

    Would it bother you too much to at least acknowledge whether or not the above post rectified the situation?
    It did on my computer, did it on yours?
    Sorry sir NoS,

    I been busy. I have to do another coding for sorting and search function. Sorry for the late reply.

    Just now I do the Me.TextBox110.Text = Sheets("RuleSetup").Range("P16").Value coding to my userform but it still on Automation Error. When you said 'It did on my computer' are referring to downloading my file and make the changes? If that the case maybe my computer may have problem with regedit

  5. #5
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    751
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Interesting...

    I did download your file, did what you indicated, saved, closed, reopened and clicked Edit Rule and it crashed big time to the extent of needing to reboot the computer.

    Changed the instruction to include the me. part same save, close, reopen and was able to click Edit Rule and user form open.

    This morning I open the same file click Edit Rule and get the crash again. Other than the computer having been totally shut down with power removed overnight everything's the same.... beats me what's happening.

  6. #6
    Quote Originally Posted by NoS View Post
    Interesting...

    I did download your file, did what you indicated, saved, closed, reopened and clicked Edit Rule and it crashed big time to the extent of needing to reboot the computer.

    Changed the instruction to include the me. part same save, close, reopen and was able to click Edit Rule and user form open.

    This morning I open the same file click Edit Rule and get the crash again. Other than the computer having been totally shut down with power removed overnight everything's the same.... beats me what's happening.
    Rebooting? Is my coding for some reason manage to change the registry of the computer? I pretty much lost on this part.

  7. #7
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,512
    Articles
    0
    Excel Version
    365
    Try the attached and report back.
    Attached Files Attached Files

  8. #8
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,512
    Articles
    0
    Excel Version
    365
    cross posted:
    http://www.mrexcel.com/forum/excel-q...-userform.html
    http://www.excelforum.com/excel-prog...-userform.html
    http://www.excelexperts.com/automati...xtbox-userform

    Fahmieyz, for your information, you should always provide links to your cross posts.
    If you have cross posted at other places, please add links to them too.
    Why? Have a read of http://www.excelguru.ca/content.php?184

  9. #9
    I am having the same problem as described by Fahmieyz above -- using windows 10, excel2016. did someone ever find the solution?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •