Posts by arttocad

    Re: Delete Specific Row Along With X Rows Above & Blank Rows Below

    This code works pretty good but if the same vendor is repeated more than 2 times in a row, it skips every other instance. The full report is 17000+ lines so I need to be certain it deletes every instance.

    Edit: I did some more testing on this code. It is deleting records from the top down which I have read will skip instances.

    Does anyone know how to revise this code to delete from the bottom up but still perform the same basic task?

    I have a spreadsheet that is exported from a database with a 5 digit PO number and a vendor name in column A. Column B can have multiple lines related to the vendor and PO number. I need to selectively delete all rows relating to a vendor from the worksheet (i.e.: two rows above the vendor name, the row with the vendor name, and each row of data below the vendor name until the next record, then repeat on every other occurance of the specified vendor.) The number of rows below the vendor name can be zero or it could be 50+.

    This could be acheived by having a cell that I type the vendor name I want to remove and then clicking a button to activate a macro or maybe with a pop-up user form? I don't have much experience with user forms though.

    The attached spreadsheet shows a basic example of the data.

    Hopefully someone can help. Thanks in advance!

    Re: Allow Use Of Workbook On Specific Computers Only

    Thank you for your replies.

    Simon, that looks like it will do the trick perfectly. I will have to try that out today.

    W@rrior, this request has come from my IT department so I think they either don't know another way to accomplish this or they want it done a certain way...

    Dave, sorry, don't mean to disrespect you or the rules but I was not asking for a way to disable macro security. I was asking for creative ways to work around the macro issue which it looks like Simon has provided.

    h1h, I tried using your code and I must be doing something wrong cause it didn't seem to work.

    Re: Allow Use Of Workbook On Specific Computers Only

    If the file was inadvertently or intentionally e-mailed to one of our competitors or an employee felt the need to take it with them when they left, we don't want the file to be usable.

    I understand that most of these types of protection may only thwart mid to low level excel users but I have been put to the task of solving this problem. Maybe there are some creative tricks to work around the macro security issue.

    Is it possible to have the contents of the file only visible when a macro is running maybe? That way, even if they had their security level set high, they wouldn't see anything.

    I have a workbook with sensitive company information. I need a way to validate the computer the workbook is being opened on and then close the workbook if it is not a confirmed workstation.

    The file is already password protected on opening, each worksheet and the workbook is protected, and the VBA code is protected. We just need to take it one step further.

    Is there a way to check a registry entry or the computers MAC address on workbook_open?

    I have found code to close the workbook without saving which I would use after a message box stating "You do not have permission to access this file."

    If someone has their macro security level set to high or very high, that prevents my code from running. How can I make this work on any computer no matter what their macro settings are?

    Any help would be greatly appreciated.