+ Reply to Thread
Results 1 to 15 of 15

Text Box Different Worksheet

  1. #1
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Text Box Different Worksheet

    I am trying to fill a textbox with a value from a different worksheet.
    I can seem to get it to work whichever way i write it.

    Also is there a way I could reference this from a different (closed) workbook

    Please Login or Register  to view this content.
    Thanks in advance for any guidance.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    What kind of TextBox & where is it?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Re: Text Box Different Worksheet

    The text box is part of a userform, the userform button exists on a different worksheet.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    If you name the sheet it should work, attach the workbook.

    To use a closed workbook you would need to open it, get the info & then close it. You can hide this by switching screen updating off.

  5. #5
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Re: Text Box Different Worksheet

    Have attached file
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Re: Text Box Different Worksheet

    Am still unable to work why the following code references the current sheet and not sheet 'loadings'

    Please Login or Register  to view this content.
    Hope someone can help

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    I don't understand your code. What is this supposed to do?
    Please Login or Register  to view this content.
    Why are you prefixing a string variable with int? You should use str, that way anyone reading the code would expect a string, not an integer
    Last edited by royUK; 02-17-2009 at 02:58 PM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    I'm working my way through the code but it's not clear what you think it will do. Can you explain what iit s doing t looks to me like you are using variables that don't have a value set.

  9. #9
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Re: Text Box Different Worksheet

    Thanks for your reply

    Have written (copied) code from books as there are many gaps in my VBA knowledge.

    The code
    Please Login or Register  to view this content.
    This finds on which row the chosen element from the drop down exists so i can input the rest of the information into textboxes.

  10. #10
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Re: Text Box Different Worksheet

    Here is my latest
    Attached Files Attached Files

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    What information is in the TextBoxes?

    I don't think your range is goint to work.

    As I said, forget your code & tell me what the form is to do?
    What information is to be entered in the textboxes?

  12. #12
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Re: Text Box Different Worksheet

    I have written the code in 2007 but when I save as 2003 it doesn't seem to work. If you can open it here is 2007 version
    Attached Files Attached Files

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    have a look at this,

    I'll lookat your new workbook later
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    08-28-2008
    Location
    bournemouth
    MS-Off Ver
    Office 2007
    Posts
    42

    Thumbs up Re: Text Box Different Worksheet

    I think that's what i need

    Thank you again

  15. #15
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Text Box Different Worksheet

    Check it out, post back with any specific questions.

+ 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