1. F

    Lottery verification

    I have an excel program where I count the numbers for the past year then use the count to pick my lottery numbers. I have won small amounts for the past year every week but never amounts over $100 so now I would like to refine my program to look at the past years drawings and compare it to my...
  2. F

    Select account to send email from

    Hi I have a code that runs through a list of people and sends individual files to each one. The code automatically sends the emails from one of two email accounts I have. Problem is, it's the account that isn't associated with the message! As this spreadsheet will be used by many different...
  3. A

    Range Code Fails reading Comment text

    Just wondering why this goes to error 91 "object or with block not set" Dim MyRange as Range Dim a Set MyRange = Application.Range("Sheet1!A2:G2") a= MyRange(1).comment.text ' Set a= MyRange(1).comment.text Both 'a=' lines result in the same error 91 Thanks.
  4. kweaver

    VBA cannot find SUMIFS in WorksheetFunction class

    What's wrong here? Dim Arg1 As Range 'the range i want to sum Dim Arg2 As Range 'criteria range Dim Arg3 As Range 'the criteria (range) Set Arg1 = Sheets("TextFile").Range("M5:N10000") Set Arg2 = Sheets("TextFile").Range("K5:K10000") Set Arg3 =...
  5. L

    Sending Emails to Muliple People

    Hello All, I'm working on editing this VBA code below to allow edits in additional cells to trigger an email sent to additional email address. Could anyone help me edit this code to allow for this? Private Sub Worksheet_Change(ByVal Target As Range) 'Updated by Extendoffice 2017/9/12 Dim...
  6. F

    Automatically email using lotus Notes - How to Format text

    Dear all, I am a beginner in VBA and I am enjoying a lot how it can help me in my activities. My company uses Lotus Notes, and I am trying to use the code below to send automatically emails using Excell/VBA and Lotus Notes. But the problem is that I don't know how to format the text of the...
  7. M

    Excel 2016 color pallet number

    I'm looking for a way to determine the number of the color set to cell. I have a macro that loops through creating a column of cells with the number background color... But I can't seem to find the corresponding color from the fill drop down. I have a table and use the color number to set the...
  8. H

    Get the List of multiple Folder in Excel

    possible to Import List (path) of Folder Names from multiple Folder in Excel Sub ListFolders() Dim MyPath As String, MyFolderName As String, MyFileName As String Dim i As Integer, F As Boolean Dim objShell As Object, objFolder As Object, AllFolders As Object, AllFiles As Object...
  9. A

    set up blank pivot tables for future

    folks, I am trying to set up a model that will report for the next twelve months. Each month is on a separate worksheet. I need to show salesperson and sales amount in one of the graphs. Given that sales people may or may not achieve a sale in any one month, I thought that using a pivot table...
  10. D

    Object required

    I am getting the object required error with this code: Sub cmdCopy() Dim wsDst As Worksheet, wsSrc As Worksheet, tblrow As ListRow Dim Combo As String, sht As Worksheet, tbl As ListObject Dim lastrow As Long, DocYearName As String, Site As String, lr As Long Dim RowColor As Long...
  11. L

    VBA crashes randomly in middle of procedure for only one user

    I created a procedure that splits a file into a bunch of smaller workbooks and then emails them using outlook. I rolled this out to approximately 20 users. It works fine on everyone's PC except one person. On her machine the macro seems to run fine and then excel crashes without warning like it...
  12. J

    VBA: Query refresh always runs first regardless of where it is in the code.

    I'm trying to create a macro that does the following: On theButton was clicked set theButton style =msoShapeStylePreset12 Run the query Query refresh completes set theButton style = msoShapeStylePreset14 end But, the button doesn't change until after the query has refreshed. I eve...
  13. S

    Formula not calculating

    Hello All, Lately I have been having certain formulas fail to calculate (yes, I AM on automatic calculation ;)). On November 2, it was a simple =Today() function that hadn't updated since October 31. Hitting calculate or refresh did nothing. Only when I entered the formula for editing, then...
  14. I

    Edit for existing working code

    Morning. The code below works but looking for an edit please. I type AB02 in the search box & the listbox returns the results from column E I wish to now type AB02 but in the listbox be able to see not only like before the results from column E BUT also column F,G,H So it would look like this...
  15. D

    Save and close a wb

    I have some code that is meant to save and close the workbook identified in the select statement (Wes_reference or Riv_reference) but it is not closing it. What have I left out? Sub AddReference() Dim wb1 As Workbook, wb2 As Workbook Dim sh1 As Worksheet, sh2 As Worksheet, site As String Dim...
  16. T

    Import new data into existing sheet to run macro on

    Hi, I have a macro enabled workbook with a specific sheet I want to be able to import data from another wb and have the macro be able to run automatically. presently if I copy or move data it creates a new sheet so the pathway is changed for the macro. At the moment I cant simply copy paste as...
  17. A

    Add the first line of the array

    Hello Excel Forum I want to add column headers to the first row in the array so how can I not lose their data Sub RevisedLoadArray() Dim DBA As Object, RES As Object, SQL As String Dim Name_Sheet As String Set DBA = CreateObject("ADODB.Connection") Dim My_Array() Dim Ar Dim i, ii, C As Long...
  18. C

    Count down the loops by a number entered on a UserForm until "0"

    Good afternoon Mr. Excel, I have a workbook that runs through code using a UserForm with several TextBoxes and a couple of ComboBoxes. The below code shows what I have so far but I am trying to figure out how to Loop through the code a specific number of times based on a value the user will...
  19. A

    Stop picture flashing as resized.

    I didn't write this and can't remember where it came from. Consists of a Form and a class module. An image file is loaded via the Forms Picture property, and a "handle" on the Form lets you drag the picture to any size. It's brilliant. Except as you drag the picture it flashes and looks awful...
  20. G

    I need a Macro that sends out email with one cells contents

    I need to fix this code so that the body of the email texted out is actually the contents of Button!D44 Not the actual text "Button!D44" this is hat I got Sub TexwhenDone() 'Must add references (Tools > References) to ' 1) OLE Automation ' 2) Microsoft Outlook xx.0 Object Library Dim outlookApp...

Some videos you may like

This Week's Hot Topics