+ Reply to Thread
Results 1 to 5 of 5

IF checkbox is marked adjust script

  1. #1
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    IF checkbox is marked adjust script

    I have a code that pulls info from a Userform to generate a text string. I have 3 checkboxes at the bottom of my userform that I want to include in the text string only if they are checked it would generate a new text string & attach it to the clipboard so all my agent has to do is paste & it is done. Here is my code:
    Please Login or Register  to view this content.
    And here is an image of my Userform.
    Screenshot 2023-07-18 142330.png

    As I have the code now this is an example of data that will generate the script: "L-IF Conversion - Created order #12345 and closed order #98765 to add RTS." If lets say the 2nd checkbox is checked then it would display as "L-IF Conversion - Created order #12345 and closed order #98765 to add RTS. Please add a cancellation fee."

    OR

    If check box 2 & 3 were checked it would show as:
    "L-IF Conversion - Created order #12345 and closed order #98765 to add RTS. Please add cancellation fee. Add swap fee."
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: IF checkbox is marked adjust script

    See next code
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    Re: IF checkbox is marked adjust script

    It works pretty good, however I believe this needs to be an IF statement, I'm just not sure how it should flow.

    Here is the code that I have modified to show correctly.
    Please Login or Register  to view this content.
    The issue I have is if Checkbox1 is the only one selected then it should show as:
    SWAP - Created order #12345 and closed order #98765 to add RTC. This is/was a city service account that I adjusted pricing, please review billing.

    If Checkbox1 & Checkbox3 is selected then it would show:
    SWAP - Created order #12345 and closed order #98765 to add RTC. This is/was a city service account that I adjusted pricing, please review billing. Add swap fee.

    If Checkbox2 & Checkbox3 is selected then it would show as:
    SWAP - Created order #12345 and closed order #98765 to add RTC. Add Cancellation fee. Add swap fee.

    If checkbox3 is only selected then it would show as:
    SWAP - Created order #12345 and closed order #98765 to add RTC. Add swap fee.

    and so on. Basically each checkbox would add a certain string of text onto the WkStg string. Thank you so much for any help that you are able to provide!
    Last edited by Jamesraywebber85; 07-18-2023 at 04:31 PM. Reason: added additional info

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: IF checkbox is marked adjust script

    Okay
    Another way
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: IF checkbox is marked adjust script

    Using a function.

    Please Login or Register  to view this content.

+ 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] Help making marked cell stay put while i sort list taking info from marked cells.
    By The_Sunken_Swede in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-18-2023, 09:11 AM
  2. [SOLVED] Error 424 on script to change the status of a ActiveX checkbox based on a cell value
    By Magmarinita in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2021, 03:01 PM
  3. [SOLVED] script to set linked cell on active x checkbox
    By MATT.B in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-27-2015, 11:07 AM
  4. Button to know what checkbox are marked
    By cyberuser in forum Excel General
    Replies: 1
    Last Post: 08-26-2012, 02:42 AM
  5. Delete Cells if Checkbox not Marked
    By Ryusui in forum Excel General
    Replies: 10
    Last Post: 10-23-2009, 07:52 PM
  6. Script to auto-adjust y-axis min
    By VandyClint in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2007, 06:19 PM
  7. [SOLVED] Checkbox to be marked with a cross rather than a tick
    By Den in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-22-2006, 06:10 AM

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