+ Reply to Thread
Results 1 to 7 of 7

Unable to add data via userform when another worksheet is open

  1. #1
    Registered User
    Join Date
    04-24-2013
    Location
    cardiff
    MS-Off Ver
    Excel 2003
    Posts
    51

    Unable to add data via userform when another worksheet is open

    Hi Guys

    I am looking for advice I have a Userform that adds data to a Worksheet called "New Fault Form"

    This works great but I cannot add the data to "New Fault Form" when I have a different worksheet open within this workbook

    Is there a code I can add that it will add the data to "New Fault Form" when I am using a different worksheet

    Thanks

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Unable to add data via userform when another worksheet is open

    Are you making sure to reference 'New Fault Form' in the userform code that adds data to the worksheet?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-24-2013
    Location
    cardiff
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Unable to add data via userform when another worksheet is open

    Hi Norie

    I have gone through it a number of times

    I am getting s Runtime Error '9' Subscript out of range

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-24-2013
    Location
    cardiff
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Unable to add data via userform when another worksheet is open

    Hi Norie

    Not sure if I need to some code to this workbook " to activate the worksheet if I am using another worksheet

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Unable to add data via userform when another worksheet is open

    Do you actually mean another workbook?

  6. #6
    Registered User
    Join Date
    04-24-2013
    Location
    cardiff
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Unable to add data via userform when another worksheet is open

    Hi Norie

    Yes I mean another workbook open

    Sorry
    Last edited by Janto724; 07-25-2013 at 09:08 AM.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Unable to add data via userform when another worksheet is open

    Try changing this.
    Please Login or Register  to view this content.
    To this
    Please Login or Register  to view this content.
    Might actually be an idea to use a variable actually.
    Please Login or Register  to view this content.
    Then all you need to refer to ThisWorkbook.Worksheets("New Fault Form") is wsForm.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 11-08-2012, 07:25 PM
  2. [SOLVED] Unable to import data to userform to edit. Also, autonumber(not formula).
    By Orestees in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-25-2012, 06:00 PM
  3. [SOLVED] Unable to open a new excel when my userform in running
    By sivakumar123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2012, 03:52 AM
  4. Unable to search and display data from userform inputs
    By cedric06 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-11-2012, 12:46 PM
  5. Unable to open MSN stock quote query in get external data in Exce
    By jermussen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2005, 11:05 PM

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