+ Reply to Thread
Results 1 to 4 of 4

Dynamic VBA fields (date specifically)?

  1. #1
    Forum Contributor
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2013
    Posts
    131

    Dynamic VBA fields (date specifically)?

    Hello! I have two issues I could use help with (assuming it's even possible). First off, here's my current code:

    Please Login or Register  to view this content.
    This code works beautifully, but there are two sections I'd like to be less fixed if possible.

    The first portion is:
    Please Login or Register  to view this content.
    This currently saves the doc as "Goal_8.01.16.xlsm" to "C:\test\08_August_2016\" which works great, except it requires me to go in each month and update the destination folder. So in September, I'll have to go into the code and change 08_August_2016 to 09_September_2016. Not anything major, takes literally less than a minute to do, but if I can figure out how to make that section of code update based on the C2 cell (which just has the date a goal is being made for), that'd mean it never has to be updated.

    I'm thinking something where I maybe set up a few more strings that pulls the month from C2 and turns it in to a number in mm format and then text? Everything I"ve tried so far has failed, so any ideas would be splendid.

    Second, I have this script set to save images to MY desktop, but is there a way to have it save to the user's desktop? If I use it then cool, but if I want someone else to use this it won't save the images I want because it's hardcoded to say C:\mrbusto. If there's some code that'd change it to be the username of the person saving the file that'd be amazing.

    Thanks for reading, sorry for the long post!

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Dynamic VBA fields (date specifically)?

    try this
    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Dynamic VBA fields (date specifically)?

    to save on the desktop use this
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2013
    Posts
    131

    Re: Dynamic VBA fields (date specifically)?

    Thanks so much! Problem solved, rep added!

+ 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. Formatting a cell specifically by date
    By rymember in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2011, 09:04 AM
  2. Dynamic calculated fields
    By gotstumped235 in forum Excel General
    Replies: 0
    Last Post: 06-30-2011, 02:06 AM
  3. Sum dynamic fields
    By WT2008 in forum Access Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2010, 12:46 PM
  4. Dynamic updating of fields between worksheets
    By Adster in forum Excel General
    Replies: 4
    Last Post: 06-21-2007, 11:53 AM
  5. Excel SHOULD NOT AUTO-CHANGE formated text fields to DATE FIELDS!
    By PSSSD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2006, 04:35 PM
  6. Sorting With dynamic Fields
    By man4mac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2006, 01:15 PM
  7. [SOLVED] dynamic colouring of fields
    By dylan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2006, 03:50 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