visual basic

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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.
  9. 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...
  10. A

    Adjust SumByColor to allow to sum by another variable

    I currently have this, but don't know how to add it to sum by both colour and another column. Assuming the numbers are all coloured by their status, I need to sum based on that as well as the category in column A - how do I adjust the VBA code below to allow for that? Category Month A Month...
  11. N

    VBA to Javascript

    Is anyone here a whiz or genius at both VBA and JavaScript? We are looking to move a certain important document to Google Sheets which contains a hideous amount of VBA for the macros within it, in order to simplify things (they search for very certain information across various ranges of data)...
  12. S

    VB Code to Open Save and Close xls file

    hello. i have the following code that is working. the only issue i have is that the template file grows in size and gets too large...as my process loops. i simply want to add code to open, save and close the template file. here is the code...
  13. S

    Excel 365 - VB script - Template File Getting Too Large

    Hello. I currently have a working vb script in access. 1. Takes a template.. abc.xls 2. opens up the template 3. exports customer data into particular tabs within the template 4. saves and renames the template according to the customer name 5. script then picks the next customer and repeats...
  14. A

    vba to check to see if a a cell equals a ranged list

    Hello, I'm new here but I have used this forum quite a bit. I currently have module that calls to the below code any time a cell is is changed in a sheet. It takes a little bit of time to execute the code, a fraction of a second maybe, which is too much for what I'm doing. Is there any way to...
  15. T

    .formula has VBA error when using special characters

    I have an excel macro that loops through table body cells on each worksheet and inserts a cell formula using a combination of text strings. There are three worksheets. The macro works fine on worksheet 1 and 3, but on worksheet 2, the macro errors out with an application-defined or...
  16. D

    How to call variables in excel macro?

    Hello, I have never coded in visual basic before. I am trying to create a macro that will graph a ton of data. I made a quick program using the "record" function, then tried to mess with it to get the rest of the data graphed. This is what I have come up with so far: Sub Graphing2() ' '...
  17. A

    Percentage Color Coding Question

    I have a column of numbers (in percentages) which is a part of a pivot table. I need to color code this column as follows: - Percentages above 95% "Good" - Percentages >= 90% and lower than 95% "Neutral" - Percentages < 90% "Bad" I would like to use Excel Styles for colors. I have written...
  18. R

    VB Code (Reference a cell to a IF/Vlookup)

    Hello. I am trying to do the following in VB. Reference a cell to a IF & Vlookup statement. Here is what I have currently. Z is a variable that works...data can range from line 6 to line 1000. ---------------------------- Private Sub Reset_Pricing_Click() (works) For Z = 6 To 1000 (works)...
  19. I

    Bespoke barcode code.

    Basically, looking for a start point with this project and what would be the most effective way of achieving it. I've attached an image of the outcome I'd like to achieve. I'll have a print out of all these barcodes and what I want to occur is that when I scan for example barcode 1 is it will...
  20. A

    Saving content of individual cells within a column as separate JSON files

    Is there a way to create a collection of JSON Files in a folder based on the content of individual cells in a column in excel? So basically, I have a spreadsheet with a column starting with cell B12 to B26. Each cell contains a JSON script. I want a VBA that would convert each of these cells...

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
Back
Top