Posts by JimmyB

    Yeah it's weird. It works on all of the 43 sheets just fine...just not that one...No real matter though, I went around it by Unprotecting at the start of the sub and protecting at the end. Works fine

    Anyway thanks for your help


    Stay safe & have a great week

    Good Morning...well it's still morning here anyway...LOL

    Here's the code I used. The line is imbedded at the end of the 'for' statement .

    Heading out for the day. Will check back later.

    Thanks JimmyB

    It normally works on all of the other 43 sheets

    Hi Jolivanes. Thread #3 was confusing & I didn't know exactly how to respond. Thought you were just making a statement of (I guess) I get it. When I advised Roy that I sent him my code, I probably should not have worded as such. instead of "I sent it to you", maybe I could have lengthened it to "I placed the code on the thread..."or something to that effect, so as to make it clearer for you. Sa-sorry if this inconvenienced you in any way. will try to be more careful in the future.

    Hi Dave thanks for the offer of information. I input the line of code as you recommended and with a bit of tweaking I think that it would have worked...but there was still some issues. Since I also had a recommendation from Roy, I thought I'd give his code a offence please. He has the same idea with the cut and paste on the same line as you suggested, but with a little twist.

    Hey Roy, you pulled through for me AGAIN. I uploaded your code and it worked right off the bat. The only thing that I had to do was unprotect my target sheet, for it to paste. (so unprotected at beginning of sub then protecting at the end). That's fine but I wonder why. I have the code in the 'Workbook Open' event, to allow all macros able to perform on protected sheets and it works perfectly everywhere else. Hmmm...don't know, but I'm happy with the help I received from Dave, Logit and Yourself. In the future, per your recommendation, I will be declaring all of my variables and will do so on the subs of this existing program that I've finally completed thanks to the help I've received from people like you guys at Ozgrid.

    Thanks again JimmyB

    Hi Jolivanes Hi Roy

    I have no idea why you sent me either of the notes (Thread #2 & Thread #10) or why Roy answered you saying "He hasn't sent me any code!!!" (Roy, Thread # 4 advised me to be more in Thread #6 I explained everything regarding my problems and attached the code with Rem statements explaining each line.

    Really guys I totally appreciate your help and have no intention of creating excess drama, but I am at a loss for words. You guys have been a lot of help and again...I appreciate it, but don't know what you want from me. I'm trying my best.

    Thanks JimmyB

    Hi Roy.. Sorry for the late response. I've been sick for the last 2 wks. Feel ok now.

    I've always had problems assigning to the variables. It seems that whenever I do that, whatever I had that worked, comes up with an error. I'll find a good training file to help me with that and improve. As far as Selecting goes, i guess I misunderstood. Someone did tell me to drop my "Select" and use "Activate" instead. In the future I'll try to go around it.

    Anyway. I'm including the code that I'm having trouble with "Pasting". There are Rem statements throughout explaining everything that's going on.

    I really appreciate your help.

    Thanks JimmyB

    Hi. I'm having a problem with pasting a range of cells from one sheet to another. I'm trying every variation that I can think of and nothing works. The whole sub works perfectly except the paste at the very end of the sub. Here's the code. Appreciate any help You can give me....Paste Method of Worksheet Class Failed.

    Thanks so much


    Hi. I'm having an issue. with my program. If I click on my button to activate my YouTube video...AND my internet is not up, my program locks up into 'Break Mode'. At that point I must save, shutdown & reopen the program. That's fine for me, but I'll have a lot of other users of the program that won't appreciate this. Is there a line or two of code that I can incorporate into my code to make this more forgivable, so the user can just be prompted to turn on the internet?

    The code that activates is below

    Thanks a ton for your help

    BTW can you tell me how to change from Unresolved to Resolved after my issue has been taken care of...Thanks again

      Sub HyperYTHome()
    Dim str As String
            str = ""
            ActiveWorkbook.FollowHyperlink Address:=str, NewWindow:=True
    End Sub 

    Awesome job Roy.

    The code to change my deletion from Row to specific range was bang on. I also streamlined my 'with' statements as you've suggested, with success. Tomorrow I'll streamline it even further with your recommendation to use the array in the above code. I can also adapt the array syntax in a few other areas of my program. Great job.

    Very much appreciate the help...all of it quite useful

    BTW... No the row numbers are not the same. Each sheet is sorted to different columns. Calorie sheet sorted to amount of calories on each food item (lowest to highest), TransFat sorted to amount of transfat (lowest to highest) so on. So the rows of food items are all over the map.

    It's 2am here. soooo g'nite

    Thanks again Roy


    Hi Roy. Thanks for your quick reply.

    I did receive the code from someone at Ozgrid and tailored it to fit my requirement of deletion. I'm sure that my adaptations of the code is rudimentary at best, but I made it work. (and it worked perfectly for what I needed). An array would probably condense the length of the code, but I'm not sure how to proceed with that. I've included the full sub below. If you do take the time to help, please take note that I only want to delete up to column "L" (my initial request)

    Thanks again and have a great day :)

    Any help will be appreciated

    Hi. Struggling with a little problem. In my program I choose a particular cell and double click it. this activates the sub which in turn deletes the complete row. That is exactly what it was designed to do, but now I've added a feature to the program which is housed to the right of the cells that are to be deleted. Since it is deleting the complete row, it messes up my new feature. Below is the portion of code:

    X is the cell in column 'A' that is activated.

    I need it to delete only the cells in row x from column 'A' to 'L' then shift:=xlUp

    Any help will be greatly appreciated



    With Target
                x = Application.Match(.Value, Sheets("VALUES for MEALS").Range("A1:A1000"), 0)
            If Not IsError(x) Then Sheets("VALUES for MEALS").Rows(x & ":" & x).Delete Shift:=xlUp
        End With

    Good Day

    I'm having a problem with a program I created using VBA. It works great on all of my computers. (I have 3 laptops: HP, Dell & Toshiba Satelite...& 1 desktop HP). I sent a copy of the program through our shared 'Dropbox' folder, to my daughter. She copied it to the desktop folder of her laptop and it isn't working properly... the macros are disabled. All errors seem related to 'not being able to run the macros as they may be disabled' etc. The program does open but none of the macros work. We get the 'Security Warning...and we checked the box "Enable this Content" that isn't the issue. I checked her "Excel" settings <Trust Center><Trust Center Settings><Macro & ActiveX settings>. They are the same as mine which allows macros, with permissions. The "Trust access to VBA object model" is also checked. I even set the folder that houses the program, as a "Trusted Location".

    Is there some setting in Windows 10 that disallows macros...BTW we both are using Windows 10 & Excel 2007. Her antivirus is Kaspersky (free) & I'm using AVG (Paid). Both hers and my firewalls are activated.

    Any help will be greatly appreciated.

    Thanks a ton

    JimmyB :/