+ Reply to Thread
Results 1 to 6 of 6

Textbox.text to .getfolder(filename)

  1. #1
    Registered User
    Join Date
    11-04-2012
    Location
    İstanbul, Turkey
    MS-Off Ver
    Excel 2010
    Posts
    26

    Textbox.text to .getfolder(filename)

    Hi,

    makro2 is my folders name.

    i want to replace the folders' name every time when i write a folder name (only folder name / the folders will be inside the same path) in a textbox on the sheet.

    For example: If i write Nov-12 to textbox the red lighted part will be Nov-12, if I write Oct-12 to textbox the redlighted part will be Oct-12, and it goes on. With that name path name (filepath) will change when i change folder name in textbox.

    However, if the textbox is empty and and anyone clicks on the button, macro will not exceute anything, and a msgbox will appear ('You have to enter a file name'

    My whole code are in module1 and i think i need a textbox in Activex controls? Can you help me with the codes and processes?

    And

    Regards,

    Ozan.

    Please Login or Register  to view this content.

    The workbook is attached.
    My whole codes are:



    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483

    Populate ComboBox with files from a folder

    You can populate a combobox from a specific folder, then select the workbook from the combobox to open.

    Right click on the sheet tab to view the codes
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-04-2012
    Location
    İstanbul, Turkey
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Populate ComboBox with files from a folder

    Dave hi, thanks for your response.

    Maybe i couldn' t define my problem. Imagine there are 20 different folder in "C:\Users\ozzy\Desktop\Sales" and every month folder numbers increase step by step. (in october if there are 20 folder, in november 21, december 22)

    Please Login or Register  to view this content.
    XX is the final folder name that contains the reference workbooks. And with a textbox when i write different name, so the reference folder changes. (after a button click.)

    But, while textbox is empty and and anyone clicks on the button, macro will not execute anything (won't allow any procedure, and a msgbox will appear ('You have to enter a file name first')

    My workbook is attached in the post.

    Thanks again,

    Regards,

    Ozan.
    Attached Files Attached Files

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Textbox.text to .getfolder(filename)

    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    You can add the value from the textbox like this.

    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    11-04-2012
    Location
    İstanbul, Turkey
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Textbox.text to .getfolder(filename)

    In an other forum, i asked for the same question with a similar name (maybe because i didn' t know about crossposting.)

    The important reason was i got some answer, bot unfortunately didnt help my problem. The other post is in here and if it' s solved i' ll mark it as solved.

    Thanks,

    http://www.mrexcel.com/forum/excel-q...lder-path.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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