visual basic

  1. F

    Selecting pictures within highlighted cells

    Hi, I’m trying to delete a picture within a certain number of highlighted cells. I’m trying to do this in VBA and every suggested code I’ve tried doesn’t work or requires specific cells to be selected however I’m highlighting the cells via ActiveCell.Offset codes. The sort of thing I’m after...
  2. P

    Userform - "Add row below" button in VBA

    Hello everyone! I create Userform with this tutorial: Fully Automated Data Entry Userform - TheDataLabs Here is main code: Option Explicit Sub Reset() Dim iRow As Long iRow = [Counta(Database!A:A)] ' idetifying the last row With frmForm .txtNR.Value =...
  3. T

    Add rows with specific content after duplicates Excel

    Hi All, I'm trying to find the best way to add an additional row that tells me when the "Exclusion status" column is rejected. Unfortunately, I don't have this data and I need to add this in, but I'm totally failing at this. All I want to do is to add a row below each "Indicator" (column B)...
  4. A

    Matrix Inverse message box help

    Hello all, I'm new to this forum, but I feel like this is a great place to get help. I am trying to find the correct If Then coding to use that will pop up a message box if there is no inverse to a matrix, but everything I have tried has failed. The closest I have gotten to something that works...
  5. B

    How do I get my userform VBA to copy and paste a specific row from a worksheet into another worksheet based on multiple complex conditions?

    I have rudimentary VBA experience, but I have a specific problem which I need VBA to solve. Here is my best attempt at explaining what I need VBA to do (with some context): Context on How the Spreadsheet Works I have a worksheet called 'Block Chain' which logs a large amount of data for a...
  6. M

    Visual Basic: how can I limit the number of characters in a range

    I have the following code. Within the range B4-P4 are the days of the week (Monday-Sunday) and I'm trying to limit the characters so that it will say (Mon-Sun). I'm not sure if .Left is the right property to use so if anyone has any other ideas, please offer them! With Range("B4:P4")...
  7. S

    Excel macro for mail merge and password protected pdf

    Hi, Thank you for reading this post. I need your help. I have some data an excel.. let's say column A has clients name and column B has clients email address. Column C sales figures. What I want is that I want to use excel macro so that 1) I can send email to each clients individually. 2)...
  8. S

    PRODUCT series excel vba

    Hi, Can someone help me? I don't know how to solve this problem: find the product of a series from i=1 to n, where X(i)= b -(n- i )* (r) and r=( (X(n)-X(1)))/n Lets suppose that n=25 and b=2, X(1)= 0,1472, X(25)=2 and r=0,772 Can someone show us the easiest way how to solve for product of a...
  9. S

    2 worksheet variables in VB

    Hello. I have a macro which is working great thus far. My last step is...copying sheet1 contents from one workbook to another workbook. Both workbooks are open and are named properly based on a script. Variables are being used to name the xls files since the VB loops and the filenames are...
  10. S

    Duplicate declaration in current scope

    So I'm taking a civil engineering course and the teacher is teaching us some coding. Not getting deep into the subject of the class, i'm trying to run this code but I keep getting a "Duplicate declaration in current scope" and keep getting the first line of the code in yellow. I don't know how...
  11. R

    Adding sheets from one workbook, to a second workbook

    Here is the scenario. When I create a new Job File, I need to add 2 specific sheets (Work and Detail) to this new job file. These sheets are in the quote file (Quote Number). The options for the Quote and specific sheets are in dropdown menu’s, however I need to select from 2 dropdown menus to...
  12. S

    VB to edit VB in Multiple Excel Files

    Hello. I am trying to do the following. I am in folder ABC. I have 50 files, a.xls b.xls c.xls, etc... I want to write a script to open up file A, go into the VB, unfortunately the VB has a passcode, enter the passcode, go into module 1 and replace the one line of code with another "static" line...
  13. X

    Microsoft VBA editor opens automatically when I unlock my pc

    Hello everyone. Some days ago I noticed that every time I unlock my pc the VBA editor window will automatically open, and somehow this affects a macro that's executed every morning day by the windows task scheduler (I think the macro is affected because since this issue came out the code does...
  14. S

    VB Code - loop a copy and paste a specified number of times

    Hello. I have a simple worksheet for an example... I want to populate R2:R6 with audi, then copy R7:R11 with benz, etc... The real dataset I have in Column S is 100's of rows, but if I can get code using the above, I'll modify it as needed. So copy Audi to column R..starting in R2 for a...
  15. S

    vb code to remain in same cell after hitting enter

    Hi. I am struggling with this one. Hopefully its somewhat easy. I know you can change the file options within excel to remain on a specific cell after entering data..and hitting enter. But thats for all workbooks, etc... Is there vb code to make this happen on only one workbook? I want to enter...
  16. R

    Loading database to userform from list box

    I would be grateful for any help with the following problem. I have built a userform to help with inputting data for a research project due to the number of variables involved and to allow for comparison of data at the time of input. By following guides I have built a form that works well and...
  17. S

    Excel - Parse Data and Categorize Based On Criteria

    Hello. I am trying to do the following: I have a part numbers listed in Column A. Based on how the part number starts, I want to categorize it appropriately. Based on the following: A1 = has part # (PLM123-ABC) I want B1 to return 1 (for the category) A2 = has part # (ABC-123-XYZ) I...
  18. S

    Excel VB Code to open another excel file (variable)

    Hello. I have the following code that works. Sub sbVBA_To Open_Workbook() Dim wb As Workbook Set wb = Workbooks.Open("C:\Users\testuser\Desktop\export\order1.xls") My question is... can the current vb code be changed to accommodate any file name? Meaning I will export one file to the...
  19. S

    Excel - VB code to default to print 1 page

    Hello. Hopefully this is simple. I have a file. text.xls... tab name is sheet1, I want to print just one page. I want it to default to do this everytime. Can I add VB code to do this? Seems like anything I do on the print screen, is not saved the next time I open it up. Thank you.
  20. K

    Print Forms with data

    I am in an internship in a company, I was offered a job in VBA that I am not able to do, the project's goal is to take a print of all forms of the application and export them to PDF with the data that I was inserting throughout the process and insert those forms in a folder whose name would be...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top