databodyrange

  1. M

    2 Workbooks, Workbooks.Worksheets.DataBodyRange(col,row) = Value Pastes to Wrong Workbook

    Hey! Goal: I have two workbooks open, the code sends information from one workbook to the other. Dim tbSendTo As ListObject Set tbSendTo = Workbooks(wbName_SendTo).Worksheets(wsName_SendTo).ListObjects(tbName_SendTo) tbSendTo.DataBodyRange(Row, colInput) = returnValue Problem: The code is...
  2. E

    Type Mismatch using NumberFormat with DataBodyRange

    In the past I've done .Range.NumberFormat no issue, but having a problem using with .DataBodyRange . The following is what I have (with generic labeling): 'Code defining variables, etc with ws.listobjects(1) .DataBodyRange(r,c).NumberFormat = "0" 'Type Mismatch Error occurs end with...
  3. L

    DataBodyRange.Rows.Count

    I have a macro that I want it to look at a table and if there is data in the table then I want it to complete a VLookup but if there is no data in the table then I want it to end the if statement and move to the next statement (there are 3 tables in total the macro moves through). It is always...
  4. M

    Set databodyrange of filtered table to include ALL cells

    I need to format ALL the cells in a filtered table (even the hidden ones). I have tried Sub test() Dim myRange As Range Set myRange = Sheets(1).ListObjects(1).DataBodyRange myRange.WrapText = True End Sub Can anyone please help?
  5. Q

    Accounting for an Empty Table - Using DataBodyRange

    Hello gurus, I've run across a problem that crops up when the filtering of a table produces no results. I am using VBA to filter the table and then copy the DataBodyRange and that works perfectly as long as there are items returned. However, when there are no results in the DataBodyRange (No...
  6. P

    ListObject + DataBodyRange + Find

    Hi tbl is one dimensional table with header. I want to get what index it has in table (dataBodyRange) tbl.DataBodyRange.Find(textToFine).row - gives me row nr in worksheet. If table is in top row, I can simply subtract 1, yet I assume there is a way to get that value without math operations...
  7. S

    Stacking multiple tables - Runtime 91 object variable

    Hi All, I've the below code which does the trick but I get a runtime error 91 on the last line starting with "tbl" . I've used on error resume and it will happily work, but this is ofcourse not the answer. I believe the error lies in the fact that the data body range will be empty following the...
  8. bs0d

    Resize Table to Last Non-Blank Row

    I'm using a query to dynamically populate a defined table in Excel. I'm trying to re-size the table to the last non-blank row, without success. I'm getting stuck on detecting the non-blank row. Here's what I've tried (two different approaches), both find the last row the table is set to, which...
  9. bs0d

    VBA Clearing Specific Table Columns

    I'd like to clear specific columns in an Excel Table (in VBA). Currently using v2013. .ClearContents will clear the entire table. I want to retain field names in the left-most column. Is there a way to detect the the end of the table like a uBound() on an array and perhaps loop to clear...
  10. J

    Table data body range copy

    Hello mr excel, I have made a fairly small data entry program in excel VBA. It runs very well, but now there is need to have simultaneous dual data entry...scary stuff in excel I know! To get around having two users on one workbook at the same time, I'm simply going to duplicate the original...
  11. P

    Copy Paste From Table to Table

    Hello, I am working on a To-Do list in Excel 2010. I am running into a paste range class invalid error. I am relatively new to VBA working off macros and google. The part I am having trouble with is moving the completed tasks to another table in the sheet, the code I currently have is...

Some videos you may like

This Week's Hot Topics

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
Top