excel 2010 vba

  1. montecarlo2012

    VBA - A line code to manipulate

    Hello. Trying to explain to myself VBA. I got the anatomy of this code in order to understand How to change or manipulate the for loop results any way I need, so what I learn from here is: Cells(Rw, "H").Value = Cells(Rw, "H").Value + Cells(Rw, Cl).Value with this line I can get my result on...
  2. D

    VBA code to send emails using email addresses from 2 columns in Excel

    Using VBA code in Excel 2010 file. I have a data set with about 300 records. I need to send emails (using Outlook) to email addresses from two columns in the Excel file. The email will have a preset Subject and text that goes in the body of the email. In addition to the text in the body, I...
  3. G

    Why is my first print, printing out twice but the remaining are ok with a single copy of the prints?

    Please review my code (Very new to VBA) and let me know why i get 2 copies of the first print then the rest come out ok with a single printed copy? I have created a Print command button and this is the associated code. [Private Sub PrintAll_Click() Dim rngOffenders As Range Set...
  4. B

    VBA Save and Clear before exiting

    Hi Guys, I hope everyone is good today :) I was just wondering if anyone knew the VBA syntax a Sub that would ask the user if they have finished using a message box then if yes clear a range of cells say A1:D4 then save and close the spreadsheet and if no allow them to continue. any help is...
  5. B

    Run time error 1004 - cannot save file this workbook with the same name

    I have been using this macro now for years and for some reason today is starting to throw this error. The macro takes a workbook and creates a new workbook for each worksheet, runs the macro "Customer Invoice" to format the file and then saves the file as the name of the worksheet plus the...
  6. J

    Excel Macro after Access database update

    Hello, I have an Access database that updates weekly. I am trying to run an Excel macro triggered by the completion of the database update (in this case, I want the excel sheet to Refresh after access updates). I have very little Access experience (someone else set it up). Any help with...
  7. P

    trying to optimize repetitive Coding

    Excel 2010, VBA, Windows 7. intermediate VBA experience. I have a large spreadsheet that generates other spreadsheets from downloaded data. I am trying to optimize the coding so as not to keep repeating the same formatting code for multiple columns, for example. Kindly responses to prior posts...
  8. S

    How to count cells with a particular data and change the cell data

    How to count cells with a particular data and change the cell data when a predefined limit is reached I am in the process of making an attendance sheet for work . for which i take mobile number and the date as inputs and mark "P" for presence. if all is well the presence is marked as "P" else...
  9. L

    VBA code to change object color based on value of another excel 2010

    Good morning, I am trying to create a heat map of the US that changes the shade of each state based on the values in another table range (B1:F45). There are 6 "tiers" of shade for each range of values: <colgroup><col><col></colgroup><tbody> 0 RGB(255,255,255) 1-140 RGB(235,241,222)...
  10. T

    data validation from multiple choice questions

    Hi I'm creating multiple choice test and i have everything done apart from the answer data validation. The problem is the questions are from a question bank of around 40 which 10 are randomly chosen and i cant figure how to create a dynamic data validation. Main sheet table <tbody>...
  11. R

    Excel VBA Add Named ranges with passed through sheet names.

    How can I replace the sheet name with a passed through named variable? MasterWB.Names("HC_Results").RefersToR1C1 = _ "=OFFSET(Results!R1C1,0,0,COUNTA(Results!C1),COUNTA(Results:Results!R1))" Does't work when I just do this: MasterWB.Names("HC_" & wsR & "").RefersToR1C1 = _...
  12. P

    Iterative Ranking Problem in a loop

    I have a spreadsheet that populates itself from individual stock data downloaded and subsequently calculated. The data is sorted per Sector Category - each sector may have one or more than one hundred tickers within it. With the excellent help from those on this forum I have been able to get the...
  13. P

    VBA to identify one criteria then delete rows based on another

    I have some simple VBA that highlights the entire row if fields in a column match a certain criteria, however, I would now like the VBA to look at the cells in another column that have been highlighted and delete the row if the cell contains the same value above or below. See example below, rows...
  14. M

    Control height/width properties and position in userform (Excel 2010)

    Hello, I'm playing around with creating a userform in Excel 2010 (under Windows 7). I have set the form's width to 250 (and the position is set to Left=0 and Top=0). I then added a frame to the form and set its width to 240. Now, the arithmetic would tell me that setting the "Left" value of the...
  15. S

    VBA-Importing a HTML table from Outlook to Excel

    Hello, and thanks in advance. Every day I get emailed a table in HTML format. Copy and paste works, but I was wondering if anybody had any clever ideas on how to get excel to do this on its own? The email comes from the same address and the table is 6Rx7C including headers. Thanks for looking!
  16. D

    Right-click pop-up menu disabled

    I have written a VBA procedure in Excel 2010 that tries to hidden commandbars and prevents several actions from the user. I have included and run this code: Dim Cbar As CommandBar For Each Cbar In Application.CommandBars Cbar.Enabled = False Next Now, when I opn ANY excel...
  17. N

    Check if file exist without Dir$()

    Hi! Is there any other way to check if file exist without using dir$() function? any help i appreciated thanks in advance
  18. A

    References for Converting VBA from Excel 2000 to Excel 2010?

    My company has authorized me to update our spreadsheets and included VBA macros to Excel 2010 from Excel 2000. The short version of my question is: What is the best reference for help in formulating a plan for the VBA conversion process so I can avoid some of the Trial and Error process...
  19. S

    One column with data, delete rows NOT containing data

    Hello all, I have a list of data in Column A in Sheet 1, and in Sheet 2 I have 1000s of rows where that data may appear once, multiple times, or not at all. I would like to delete all rows NOT containing the data in Column A from Sheet 2. How can I do this? Let me know if you need more...
  20. A

    Cannot reset Application Calculation status to Automatic

    Excel 2010 VBA In order to make the code below run faster, I set the Application to manually calculate formulas. At the end of the code, I turn it back to automatic. However, in the status bar on the spreadsheet it still shows "Ready Calculate". When I hover over "Calculate" is says...

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