+ Reply to Thread
Results 1 to 7 of 7

VBA Add / Edit Paint Form Codes

  1. #1
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    950

    VBA Add / Edit Paint Form Codes

    Hello,

    Can someone please help with codes for the Paint Detail Form? On the Admin sheet I have a red shape "Add / Edit Paint" which opens the form. The information for the form is on the sheet Paint Detail.

    I was able to get the form to open and close.

    Thank you very much
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: VBA Add / Edit Paint Form Codes

    Hi billy60,

    Try the attached.

    I have added some code to all of the codes on that UserForm.
    Some basic checks are also included; check if a Pain Code already exists when adding a code, confirm deleting a Paint Code.

    Let us know if that is what you intended or changes are required.
    Attached Files Attached Files
    Last edited by ORoos; 10-04-2023 at 03:05 AM. Reason: Updated some code in attached file
    If your Question is answered; please mark it SOLVED. If you are happy with a member's solution, say 'Thanks' and click the 'Star' to Add Reputation.

  3. #3
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    950

    Re: VBA Add / Edit Paint Form Codes

    Thanks @ORoos but is seems the cost and coverage are switched. I will see if I can make the correction.

    I made changes to get information in proper textboxes.

    How to format the cost textbox for $00.00 ? (I found code to do this see below)

    When I add new paint I have to close form and reopen form to view that new paint in the combobox.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by billy60; 10-04-2023 at 04:16 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: VBA Add / Edit Paint Form Codes

    Sorry about the box mix-up. Glad you worked it out.

    I have added the $ formatting for the cost field.

    Also updated so the drop-down list will include any new items added so you no longer need to close/open the form.


    Let us know if that works or further changes are needed.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    950

    Re: VBA Add / Edit Paint Form Codes

    Just one thing I noticed. If I make the mistake when adding new paint and click save/update it goes to debug.

    Perhaps a message "This paint does not exist yet please add"

  6. #6
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: VBA Add / Edit Paint Form Codes

    Try the attached.

    PS: Thanks for the 'Rep'
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    950

    Re: VBA Add / Edit Paint Form Codes

    Perfect! Thank you very much!

+ 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. [SOLVED] Compare JSON data and splitting into corrected codes, deleted codes and added codes
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 12-01-2020, 06:46 AM
  2. [SOLVED] Compare JSON data and splitting into corrected codes, deleted codes and added codes
    By chandramouliarun in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-29-2020, 12:06 PM
  3. [SOLVED] Reorder Vehicle Tables and Edit Codes
    By ynab in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2020, 02:11 PM
  4. [SOLVED] Edit Codes to Allow For Tables Converted to Ranges
    By fredfarmer in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 04-14-2019, 06:44 PM
  5. Need VBA codes to be used in a uer form for password and userid
    By alex_a in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 04:10 PM
  6. if blank cells, paint yellow. if cell to left is less than a number, don't paint
    By curbster in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-09-2009, 02:40 AM
  7. Replies: 1
    Last Post: 09-01-2005, 04:05 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