+ Reply to Thread
Results 1 to 6 of 6

VBA Code Writing Help

  1. #1
    Registered User
    Join Date
    04-20-2022
    Location
    Chicago, Illinois
    MS-Off Ver
    2020
    Posts
    7

    VBA Code Writing Help

    Hello,

    I am looking to create two separate buttons using VBA and have not been able to successfully write a working code for either.

    I am trying to have both these buttons edit every Excel file in the same folder as the excel workbook containing the button and every sheet within each Excel workbook.

    1. For the first button I am hoping to add data to three columns within a given range of a workbook and to have this data displayed on the next available line. To clarify, each sheet in each workbook has the same Bill of materials template on it, and each bill of material has a revision log within range Q3:U10 (three data columns made larger by merging cells). Each bill of material may have a different number of revisions, so I was hoping the user could be prompted to enter the data for the 3 columns (rev, date, description), and the information will be added to the next available line of each worksheet's revision log. The other buttons I have so far are in a separate workbook and alter all files contained within the same file folder.

    2. Similarly I was hoping to create another button which when pressed would prompt the user to input a part number (Located in column A) and then type a note which would be displayed in the part number's corresponding notes column (column AB). Just like button 1, I was hoping to have this is in separate workbook which would then alter every sheet of every workbook located within the same file folder.

    I realize this is a complicated series of questions. I appreciate any help or any reference information!

    UNDECLARED crosspost here: https://www.mrexcel.com/board/thread...-help.1202810/


    Thank you
    Last edited by Glenn Kennedy; 04-20-2022 at 01:08 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: VBA Code Writing Help

    Hi vhoffman and welcome to the forum,

    Yes, your question is more than wanting a simple formula. Doing a search online I find a site that may give you a start at:
    https://analystcave.com/vba-run-macr...in-a-workbook/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: VBA Code Writing Help

    Welcome (back) to the forum.

    Thanks for your question. However, we have just found out that you have posted the same question elsewhere.... and haven't told us. Feel free to cross-post on other sites...

    But. Every forum has its rules. Please see Forum Rule #3 about cross-posting. So.

    Do not keep it a secret. We all are willing to give you our time, freely. However, some of us get very annoyed if we waste our time developing a solution for you, when you already have a nice solution elsewhere. All we ask is that you show us some respect and tell us:

    1) if you have cross-posted, and

    2) the URL of the cross posts.

    That way, those of us who don't want to waste their time can quickly check to see if you're already happy with another solution.

    (Note: since you are new here, on THIS occasion, I have done it for you.)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    04-20-2022
    Location
    Chicago, Illinois
    MS-Off Ver
    2020
    Posts
    7

    Re: VBA Code Writing Help

    Thank you glenn, In the future I will be sure to include any cross post information!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: VBA Code Writing Help

    OK. No problem. I can't help you... unfortunately... 'cos I know nothing about VBA. Others will help, though.

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA Code Writing Help

    @vhoffman - see big yellow banner how to upload your workbook - far easier for us to give a solution when seen in context.
    however first request - remove the use of merged cells (they are the work of the devil),, they made data handling unnecessarily complex.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

+ 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. writing vba code to fill in column of sheet, formula works vba code will not
    By pdx2245 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2019, 05:15 PM
  2. re-writing VBA Code
    By ShakJames in forum Excel General
    Replies: 2
    Last Post: 02-13-2015, 11:05 AM
  3. Writing a Formula using R1C1 code in VBA code
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-15-2014, 11:06 AM
  4. Need Macro to Transfer Data from sheet 2 to sheet 1
    By STU22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2013, 03:09 PM
  5. Need date wise In and out time for employee ID
    By priyanka.r8523 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2013, 06:30 AM
  6. Need Help on Writing a Code... Please
    By uu_urfriend in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2012, 09:34 PM
  7. writing VBA code
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2010, 03:54 PM

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