tbl

  1. D

    Modify code so that formulas in table rows are not deleted

    I have the following code: Sub DeleteCostingLine() Dim ws As Worksheet Dim tbl As ListObject Set ws = ActiveSheet Set tbl = ws.ListObjects("tblCosting") tbl.ListRows(tbl.ListRows.Count).Delete Worksheets("Costing_tool").Range("AB5").Value = "1" End Sub This...
  2. D

    Object variable or with block variable not set

    What variable has not been set in this code? Sub cmdNot_Accept_click() Dim DocYearName As String Dim ans As String Dim tbl As ListObject Dim tblrow As ListRow Set tbl = ThisWorkbook.Worksheets("Costing_tool").ListObjects("tblCosting") If ActiveCell.EntireRow.Cells(1, 1).Value = ""...
  3. B

    Loop through tables and selecting a column

    Trying to loop through all tables on a worksheet and select column #5 but don't know how. All I got is: For each tbl in ActiveSheet.ListObjects ActiveSheet.ListObjects(tbl).ListColumns(5).Range.Select next tbl It does not like the ActiveSheet.ListObjects(tbl).ListColumns(5).Range.Select...
  4. W

    Create a list of all tables in a workbook

    Hi, I am trying to create a list of all tables in a workbook and I am also trying to create an userform with one or more list boxes with the table names in them. The listbox is called listbox1, listbox2 and listbox3. Sub tableAllSheet() Dim sh As Worksheet Dim tbl As ListObject...
  5. S

    Help with this VB code

    The below code works perfect taking what is in the form and adds it to a table on another sheet. Private Sub bOkay2_Click() Dim tbl As ListObject Dim ws As Worksheet Dim lrow As Range Dim lrow2 As Long Set tbl = Sheets("Missed Scan Summary").ListObjects("tblncidents") If...
  6. Woodpile

    Deleting Records In One Table Based on Query Results From Another

    Hello All, I am hoping someone can guide me in the right direction. I am trying to delete records in one table based on query results from another table. I have two tables of interest: For clarity, call them Tbl A and Tbl B. Tbl B is entirely a subset of Tbl A with certain fields included...
  7. T

    Sort by Active Table, Help.

    Please help. I cannot get this macro to work.... I am trying to sort by the active table, criteria is column 1. Then I would like to add a second critera, column 5 of the table. I keep getting an error on the line... ".Sort.SortFields.Add Key:=Range([activeTable("Column1")])...
  8. D

    VBA Formula in table

    Hi! Im trying to get this formula to work. It calculates the total hours from start time to end time and converts it to numbers instead of time. When executed it gives a runtime 1004 error. When i copy the formula by hand it will work just fine. Can someone please help me out? Below the VBA...
  9. P

    Scrape html table for multiple web urls

    Please find the below code for 1 url. How to scrape data for multiple urls that is pasted in sheet 1 of excel and result of the scraped data in sheet 2. Sub Test() Dim html As Object Dim tbl As Object Dim tRow As Object Dim tCel As Object Dim X As Long Dim y As Long With...
  10. W

    Autofill Formula Across Table with Variable Number of Columns & Rows

    I'm trying to create a Macro in VBA that will autofill a formula in the first column of the total row of a table over to a newly created column all the way to the right. Here's what I have right now: <tbody> Week Person #1 Person #2 #1 #2 #3 #4 #5 #6 #7 #8...
  11. K

    Need to save a range of cells into a variable and make the count show up in a MsgBox

    title says it all, here's what I have now, but for some reason, it's not working when it should... Range("A3").Select ActiveCell.Offset(1, 0).Activate Dim tbl As Range Set tbl = Range(Selection, Selection.End(xlDown)).Select MsgBox tbl.Rows.Count

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