+ Reply to Thread
Results 1 to 6 of 6

Code Produces Error When Trying to Operate a Particular Userform after Another

  1. #1
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Code Produces Error When Trying to Operate a Particular Userform after Another

    I have a program that plots voltage and current waveforms and digital inputs and outputs of power system relays. I am running into a problem that if I have plotted a digital plot, when I try to plot the waveforms I get an error. The line of code that highlights is the line of code that sets the X axis values for the plot. The only time this happens is when a waveform is attempted while a digital exists. You can plot waveforms, then go back and run the waveforms macro again, and everything will work fine. You can also do multiple digital plots in a row. Also, you can plot a waveform first and then plot a digital without flaw. The only issue is trying to plot a waveform after a digital. Please see the attached sample spreadsheet so that you can reproduce what I'm seeing. Just run the macros in whatever order so that you can get a better feel for what I am talking about. Please let me know if further clarification is needed. Does anyone know what the issue may be? My troubleshooting techniques are very novice with VBA...Thanks in advance for the help!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Code Produces Error When Trying to Operate a Particular Userform after Another

    Hi,

    How do you plot to a Digital?
    Give an example of what you first do the what it is that you do when you rec the error.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Code Produces Error When Trying to Operate a Particular Userform after Another

    Hi,

    I added a line of code to activate sheet3.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Code Produces Error When Trying to Operate a Particular Userform after Another

    Charles,
    That fixed it! Thanks! I have been running into a lot of situations where I have to activate a sheet. Don't know how it got past me...thanks again!

  5. #5
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Code Produces Error When Trying to Operate a Particular Userform after Another

    You are welcome and thanks for the "Rep".

  6. #6
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Code Produces Error When Trying to Operate a Particular Userform after Another

    no prob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1