+ Reply to Thread
Results 1 to 9 of 9

how to make my code work with target.column instead of target.address

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    how to make my code work with target.column instead of target.address

    cant create new post without getting a virus error. why is that

    only happens when i post my code.
    Last edited by dmcgov; 09-15-2017 at 11:42 AM.

  2. #2
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: this is a test, when i post it says sql injection issue, why is that?

    Please Login or Register  to view this content.
    i have the following that works on just one row. how can i make that to work on any row?

    Please Login or Register  to view this content.
    i tried select case target.column but couldn't get the syntax to work correctly.

    can anyone help me with this?

    had to split the code up so i could post it...

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: how to make my code work with target.column instead of target.address

    Change the Select to use Select.Column and change the Cases to use the column numbers.

    Something like this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: this is a test, when i post it says sql injection issue, why is that?

    By the way, since the only thing you change based on the column is the message for the input box then something like this might work.
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to make my code work with target.column instead of target.address

    your a genius, many thanks norie.

  6. #6
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to make my code work with target.column instead of target.address

    one last question, see my code below, is there anyway to condense even more?

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to make my code work with target.column instead of target.address

    got it, here is the final code:

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: how to make my code work with target.column instead of target.address

    You could condense that further as you don't really need the Select case.

    All you really need to do is check if Target.Column is 5.

    If it is set the message to 'What is the description ..

    ', otherwise set the message to 'What are the...'.

  9. #9
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to make my code work with target.column instead of target.address

    thanks again norie, i will do that.

+ 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] Issue with logical test formulae
    By siddgarg90 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-05-2017, 03:50 AM
  2. Issue - SQL injection detected
    By Olly in forum Suggestions for Improvement
    Replies: 5
    Last Post: 10-15-2016, 05:20 AM
  3. [SOLVED] sql injection detected
    By peter_swe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2016, 08:52 AM
  4. [SOLVED] Logical test across different sheets issue
    By syp34892 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2015, 12:55 PM
  5. Another Test to Column issue
    By smithla in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-25-2013, 08:13 AM
  6. Plastic injection molding production calculator
    By vinnievegas in forum Excel General
    Replies: 6
    Last Post: 04-16-2010, 03:51 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