+ Reply to Thread
Results 1 to 3 of 3

Making a UserForm to modify current variables

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Gatineau, Qc, Canada
    MS-Off Ver
    Excel 2007 (Or Anything)
    Posts
    43

    Making a UserForm to modify current variables

    Good day World,

    I would need a good kick in the butt to start me up for user form stuff, I've tried to find a few things but they aren't helping me for what I really want to do and I can't seem to find the right fit.
    My Script works fine but I need to manually edit the top level of the code to modify each variables paths or file names or values each time. (More User Friendly, for me & my colleagues)

    How can I make a user form from a running click macro to ease the following variables into a small user form?

    vPeriod = "P9" ' Changes the Sheet Name at the End (Month Forecast) <-- A simple txt box to modify the Sheet's name
    vData = "Sheet1!$A$1:$L$1000" ' Change Line 1000 to new value if more <-- A simple txt box to modify that 1000 number because the rest always stays the same.
    vPath = "C:\FilePath\filename.blabla" 'Initial Report Extract File <--a Simple browser code to locate the file
    vTemplate = "PivotStyleMedium2" '<-- Drop Down code in order to add some coloring for females :P
    vSaveAs = "C:\Desktop\conciliationP9.xlsx" ' I'm open to suggestions , file path and a naming function?
    vLastRecon = "S:\FilePath\[BASS8.xlsx]P8" <--a Simple browser code to locate the file.In this case, it's an excel file /sheet

    Then I would add the Run/Generate to load the script with the update variables and Close button for whoever uses it ?

    Who can help me or provide me with some sample code to play with to get this running from a userform?

    Bassinator

  2. #2
    Registered User
    Join Date
    10-26-2012
    Location
    Gatineau, Qc, Canada
    MS-Off Ver
    Excel 2007 (Or Anything)
    Posts
    43

    Re: Making a UserForm to modify current variables

    Here is my user form now that I have the file! Any help is appreciated, as I mentioned in my previous post, I simply need the code in order to change each variable values etc. I have attached an example and have put a browser code that I found but I'm a rookie!


    Please Login or Register  to view this content.
    Last edited by bassinator; 11-30-2012 at 09:30 AM.

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    Gatineau, Qc, Canada
    MS-Off Ver
    Excel 2007 (Or Anything)
    Posts
    43

    Re: Making a UserForm to modify current variables

    I have figured it out

    Thanks anyways!

    Cheers.
    bassinator

+ 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