excel vba

  1. S

    Ambiguous name detected unable to run code

    Private Const AuditSheets As String = "|Sheet3|" ' Must start and end with the "|" character Private Const AuditRange As String = "$C$2:$G$32" ' Change the tracked range as necessary Private Const LifeSpan As Double = 0.0013 ' 24 hour lifespan Private NextTime As Date Private Sub Workbook_Open()...
  2. G

    Excel VBA:Paste multiple times

    Hi All, I am new to Excel Macro and to this forum. I am trying to write a macro to copy a range multiple times. Please correct me if I am wrong. Sub Macro1() Dim x As String Dim x1 As String Dim x2 As String Dim p, q As Integer Range("A1").Activate p = 1...
  3. M

    VBA Code to copy a cell when a match is found

    I am kinda new to VBA and have been using VBA to increase my efficiency and to analyze data faster so my VBA coding skills are not so great. This particular problem has me a bit lost as I have tried googling to get some code that I can modify but can't seem to find anything that does what I...
  4. A

    VBA PivotTable ShowDetail writing into array

    Hello everyone, I have a PivotTable with 5 thousand rows. For each row, I need to know their detailed positions. I can use the ShowDetail method, but it's not exactly what I want. It's created a new sheet for each row. Is there a way to extract details of a row into a variable without creating...
  5. S

    Need Help on ODBC Connection

    Hello Everyone, I have connected Excel with a third party accounting software called Tally through ODBC connection. I use the connection to import data in Excel from Tally. Is it possible to send data from excel to Tally through ODBC connection. Usually i do this process manually. First i save...
  6. D

    Run-time error 287: Excel VBA Referencing Outlook Objects

    Hello, As I continue my studies into how to navigate the Outlook hierarchy using Excel VBA, I find that I often run into Run-time error '287': Please forgive me for asking another question on this subject. First, my understanding of the Outlook hierarchy is this: Outlook Application -...
  7. C

    Header Formatting in VBA

    I have a Sheet that I am trying to format the header on... I have the code to create the header, but can't get the line spacing right... Any help would be great... Here is what I have: unitype and unitnam are strings from a userform. When I run this is looks like this: 38 MP CO - DEMOB OUT...
  8. C

    CSV Import while skipping "column" data from CSV

    OK...I have some code that imports a csv into a sheet, but I don't want ALL of the data... I need to be able to skip certain "fields" in the line string from the CSV. How can I accomplish that with the below? Sub ImportCSV(customerfilename, unitnam, targetSheet) Dim rw As String With...
  9. C

    Exclude TExt Boxes from Emplty control code

    Found this little tid bit somewhere on the web and it works great, but was wondering if someone could tell me how to modify it so that I could not include certain textboxes (controls) Dim t As Control For Each t In Me.Controls If TypeName(t) = "TextBox" Then ' Make sure we're only looking at...
  10. V

    How to run the next statement if the cell value is blank in EXCEL VBA

    I Have a requirement to fill a web form using VBA. In a input data sheet Column F,G,H has few cell are blank. I want to skip those blank cells and move to next statement without showing any error. I have mentioned the VBA SCRIPT which I have created. If someone help me to fix this i will feel...
  11. C

    Setfocus from inside of Frame

    Quick question... I am trying to set focus to a CMD button outside of a frame from a text box inside the frame. I get an error msg "Run-time error..... "Unexpected call to method or property. I have tried the setfocus …. frmlvecalc.cmdAdd2.SetFocus and me.cmdadd2.setfocus. Is there...
  12. O

    Grouping rows by criteria excel vba

    What I need; I have a sales master data (with over 20 columns). It contains the following: S/N, Customer, Invoice date, Due date, vessel, producer, fiscal regime, quantity, price, sales value, date paid, amount paid, variance, remark, etc 1.) I need a macro to group this report by invoice...
  13. O

    VBA code to split sales report sheet to groups by invoice type to a new worksheet

    I have a sales master data (with over 20 columns). It contains the following: S/N, Customer, Invoice date, Due date, vessel, producer, fiscal regime, quantity, price, sales value, date paid, amount paid, variance, remark, etc 1.) I need a macro to group this report by invoice type, sum each...
  14. M

    Excel vba or formula to Look for non zero in excel sheet row

    Hello, I need help to avoid alot of manual work and error. I have sheet with width of material in row 4 column C to AV and possible cut patterns in row 5 to 103 in column C to AV having values of 0 to 5. I want the width against non zeros and number of times if it is greater than 1. As in Row...
  15. R

    code to click and save files

    I need help with clicking a button using vba to download the files, Here are the steps what I'm trying to do: Log in web site: (due to restriction i cant provide site details.) download attachments from the "download attachments" button Save the files(all files - any format) to specified path...
  16. J

    Using Listbox to alter data in the worksheet

    Good Afternoon everyone. I have a worksheet that monitors peoples favorite snacks, see image. I have a combobox1 in a userform which displays a list of all names. When the user selects a name, the preferred choice of snacks appear in the listbox on the userform. Combobox2 has a list of all...
  17. R

    How to filter a column with multiple dynamic dates

    I have a macro where I can filter x amount of times I want any column of any workbook to show only the activecell value. I have it installed on personal macros so it works with excel instead of any specific workbook meaning it works with all workbooks. Now I'm trying to create a macro for the...
  18. J

    Macro terminated after the first condition in IF is met

    Hello guys, I have this code of mine in the Macro (And yea, I tried using the classis "i" as a variable, did not work so I changed it to "g") For g = 1 To 20 If (InStr(1, salesWS.Cells(g, 2).Value, "X004a", 1) > 0 And InStr(1, salesWS.Cells(g, 3).Value, "TOBI", 1) > 0 And...
  19. A

    VBA to copy and convert data to a different sheet

    Hi everyone, I'm trying to both copy and convert data from 1 sheet to another. Currently my team has to use 3 different sheets just for the purpose of getting clean data. To be more specific, 1st: Raw data is first pasted into a sheet called "Paste Target Data Here". 2nd: From there, the...
  20. C

    How to import data to cells that contain data and SUM the two values

    All, Thanks to GlennUK, I have gotten this far, but am now perplexed... Using "Find" to import the data to multiple columns and rows was a great idea, but now I need to import additional data to those same ranges and sum it with what is already there... How? I have been trying to figure this...

Some videos you may like

This Week's Hot Topics

Top