+ Reply to Thread
Results 1 to 5 of 5

Any VBA experts who can help a newbie out?

  1. #1
    Registered User
    Join Date
    06-17-2019
    Location
    UK
    MS-Off Ver
    O365
    Posts
    2

    Any VBA experts who can help a newbie out?

    Hi all, first post on these forums, I signed up specifically to ask this question and I'm wondering if anyone can help me out

    I'm trying to use VBA to lock a specific set of cells when one cell at the top is empty, and unlock when it isn't empty. I've collated the below VBA code from various places, and this one works perfectly:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    However, this one doesn't work and gives an error when the code runs:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The ranges in both instances contain merged cells, so I can't imagine that's the problem. Can anybody spot what I'm doing wrong?

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation

    Hi !

    Merged cells ?

    Merged cells ! Vade Retro Satanas ‼

    LoL !

  3. #3
    Registered User
    Join Date
    06-17-2019
    Location
    UK
    MS-Off Ver
    O365
    Posts
    2

    Re: Any VBA experts who can help a newbie out?

    Yep tell me about it!

    Maybe it's tough to advise without the context?

    In the first example (which works), columns S and T aren't merged, but columns U & V are merged on each row.
    In the second example (which doesn't work), columns AB & AC are merged on each row, and columns AD & AE are also merged on each row.

    Again not sure if this is the cause, I can't see any obvious errors in the code, but then I am a newbie

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Quote Originally Posted by Yohannas View Post
    […] and gives an error when the code runs
    So precise ! Shall we guess ?‼ Wait, I'm trying a long distance mental connection …
    Oh gosh ! I forgot here it's very not a mind reader forum ! Maybe you should try to find out one …

    Quote Originally Posted by Yohannas View Post
    Maybe it's tough to advise without the context?
    That's it !


    As per any forum rules, the better initial explanation with a workbook attachment accordingly,
    the quicker and more targeted answer …

    But as a new member with few posts, you are maybe not allowed to join any workbook.
    So at least just crystal clear explain the error you met, the message and why not, the context ! …

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    And on which codeline the error occurs ‼

+ 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. Greetings to all Experts
    By pnasir in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-21-2016, 10:15 AM
  2. Hello Experts ;)
    By bbanach in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-18-2015, 05:31 AM
  3. Hellos, another newbie here. An old newbie 31 years just started to use VBA!
    By vba_newbie83 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-31-2014, 03:37 AM
  4. Hello All Excel experts and (like me) non experts !
    By markymark& in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 03-03-2013, 09:09 AM
  5. How do you experts know so much?
    By livemusic in forum The Water Cooler
    Replies: 5
    Last Post: 08-13-2012, 02:32 PM
  6. again for the experts
    By Herman in forum Excel General
    Replies: 0
    Last Post: 10-28-2005, 12:05 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