Assigning values to variables

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,352
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have some code where I assign values to variables:

Code:
    'assign values to variables
    Combo = Worksheets("Home").Range("Y5")
    LastRow = Worksheets(Combo).Cells(Rows.Count, "A").End(xlUp).Row + 1                                    'number of first empty row in column A of Combo
    TableNumberRows = Worksheets("home").ListObjects("tblCosting").Rows(Rows.Count).Row                       'specific row in tblCosting
    tblRows = ListObjects("tblCosting").ListRows                                                            'number of rows in tblCosting

What is wrong with the syntax of the last 2 lines?

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
15,197
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Depends what your objective is as you haven't stated it :confused: so we can't tell you the correct syntax without guessing.
 
Upvote 0

Forum statistics

Threads
1,195,674
Messages
6,011,098
Members
441,582
Latest member
Topkapi

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