set

  1. C

    VBA Outlook Run Excel Macro When Received email in Outlook Subfolder

    Hi, I want to trigger excel macro TEST12.xlsm when received en email with subject title "Test", it work when the mail arrived in inbox folder, but not in subfolder. Can anyone enlighten me or point me to the correct sub folder path? The subfolder name is "Biz Ops Report" and I am using below...
  2. D

    Generating email using VBA

    Hi all it's me again, I'm using some code from Ron De Bruin's site to generate an email using the following code Sub Mail_small_Text_Outlook()'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm 'Working in Office 2000-2016 Dim OutApp As Object Dim OutMail As Object...
  3. D

    Exporting undelivered emails from Outlook to Excel

    As the title suggest, I'm trying to export Undelivered emails in Outlook to Excel (sheet1) I found this code on the web, and I'm having a little difficulty getting it to work Ideally I would like the data to appear in columns, a separate column for Email address etc The Emails are in sub-folder...
  4. L

    VBA PasteSpecial method Worksheet class failed

    Hello everyone, I have a code which starts this: Private Sub CommandButton1_Click() Dim destination As Worksheet Set destination = Worksheets("STATS") Set myIE = CreateObject("InternetExplorer.Application") myIE.Navigate "https://www.internetpage.com/lblabla.html" myIE.Visible = True...
  5. T

    Loop Each Tab and Delete Rows

    I have the following code: Sub delete_dc_row() Dim wbCurrent As Workbook Dim wsCHINO As Worksheet Dim wsSTOCKTON As Worksheet Dim wsFLM As Worksheet Dim wsDGV As Worksheet Dim wsAURORA As Worksheet Dim nLastRow, i As Integer Set wbCurrent = ActiveWorkbook Set wsCHINO =...
  6. S

    VBA datestamp csv export filename

    Hi folks, Can anyone edit the snippet below to add a datestamp to the cvs filename in the format "yyyy-mm-dd hh-mm-ss"? Many thanks in advance! Sub saveTableToCSV() Dim tbl As ListObject Dim csvFilePath As String Dim fNum As Integer Dim tblArr Dim rowArr Dim csvVal...
  7. C

    VBA to define variable using if then

    I am wanting to have a outlook email address to be set based on the value of Combobox2. What i have doesn't seem to function, and i am sure it is simple but i am a little stuck. any suggestions would be great. What i have so far is: Dim name As String If ComboBox2.Value = "Bill" Then Set...
  8. kelly mort

    My smart tweak ended up crashing excel- I need expert advice and fix

    I have a table layout as below, it used to work with the code below until I inserted the column under “M” then replaced all 12 with the 13 you see in the code. For i = 2 To 13 And rCell.Offset(, 13).Value = Rnk & GetOrdinalSuffixForRank(Rnk) I was thinking that will fix...
  9. M

    Ranking using VBA

    I'm trying to rank a list of values using VBA rather than a formula as the numbers will be continually changing. I'm basically trying to run the code at a set point to rank the lowest 3 numbers on the sheet and leave them set rather than recalculating with a formula. Thanks
  10. W

    Importing multiple excel files into one spreadsheet

    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the previous day's data. To make it more complicated each day's file has two tabs that i need to import but I'm assuming the code below will do this...
  11. A

    Workbook_SheetChange event

    I need pivot tables to refresh automatically once a user enters new source data. I have my workbook set up on monthly tabs and the users can enter data below row 12 on each of these tabs. I have set up the workbook with dashboard/display tabs at the front and the monthly data sheets at the...
  12. T

    Rather have blank cell than 0-Jan-00

    I have a cell on sheet A that employs VLOOKUP from data from sheet B. The cells on sheet B have a date or is blank. When it is blank the result is 0-Jan-00. How can I set it up so I get a blank like the other page?
  13. A

    run time error 9

    Hi I have the below code to copy data from one workbook to another but keep getting a subscript out of range error on the line... Set wb = Workbooks("2019_-_Couriersheet_-_copy.xlsx").Worksheets("Triage2") Both workbooks are open and I've checked the file name is correct etc. What could the...
  14. T

    Problem Adding Email Signature

    Hi all, I have the following code and all is working ok, apart from it is no longer adding my set signature in Outlook . If possible could you have a look and amend as required. Sub ScorecardPdfEmail() Dim OutApp As Object, OutMail As Object Dim fname As String, sendto As String...
  15. T

    Run Time Error 1004: Cannot save this workbook with same name as another open workbook or add-in.

    Hello - Anyone able to assist a newbie on VBA coding, please. I have learned some great stuff reading comments and watching online videos, etc. But, I have patched together some code from various excel experts to: 1. save the file and then email as an excel attachment (.xlsx) The issue...
  16. T

    Excluding a range when copy a worksheet

    Hello, I want to copy 3 worksheets to a new workbook, but exclude a range from one of the worksheets (and any buttons on the worksheet as well. I want to exclude J1:U2 on "Metric Report" Is there a way to do this? this is what I am using right now Sub ThreeSheets() With...
  17. davewatson86

    VBA/SAP help

    Hi all i am trying to automate the creating and saving of invoices as a pdf. so far i have everything working up until it brings up the pdf preview and then i cant get it to work from there. i have done heaps of searching and tried lots of different code but to be honest its a bit out of my...
  18. L

    Format Control

    I have my format control to change by week stating for 2019 and it runs to week 52 but i want that to change in 2020 to start week 1 thru week 52. Control set to Minimum Value: 44 i started with the data for week 44 Maximum Value: 52 Incremental Change: 1 Page Change: 3 Cell Link: Calculation!$A$2
  19. T

    VBA: Is there any way to "make all items visible" in a PivotTable Field?

    I recorded a macro by going to a PivotTable, and in the dropdown for the field i was interested in, i checked "Select all)" and then pressed OK. What VBA recorded was this: With ActiveSheet.PivotTables("PivotTable3").PivotFields("Vaca") .PivotItems("excl").Visible = True...
  20. I

    pi>Visible <Type Mismatch>

    Respected gurus, experts and MVPs, I have written the following code for the pivot table and it is generating pi.Visible <Type Mismatch> error. Sub piVisibleMismatch() Dim lastrow As Long, endrow As Long Dim Psheet As Worksheet, Dsheet As Worksheet Dim Pcache As PivotCache, Ptable As...

Some videos you may like

This Week's Hot Topics

  • Get External Data (long shot question!)
    This is likely a long shot but I am wondering if it is at all possible for Excel to somehow 'change' the contents of a URL that is being linked to...
  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • Cell Formatting
    Good Morning, I need to format a few different cells in the following manners: A1 has to always add a colon (:) after whatever is typed in by a...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • Workbook_Change stopped working !
    I am working on an app to speed up & automate processing of Credit Cards statements. After data is input from a CSV file, it is presented to the...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
Top