You need Set with objects:
Set rng = Sheet8.Range("A12")
Sheet8 is fine.
Sheet1.[a1]
More Related Contents:
- Unprotect VBProject from VB code
- Assign event handlers to controls on user form created dynamically in VBA
- VBA: How to delete filtered rows in Excel?
- Round function in Excel, worksheet function vs VBA
- Excel VBA Userform – Execute Sub when something changes
- VBA Function argument list select
- Excel VBA wildcard search
- Reading Web Pages using Excel VBA
- to make this code simpler
- VBA code takes long time to execute in excel
- What is the lifetime of a global variable in excel vba?
- How to check for empty array in vba macro [duplicate]
- Use autofilter on more than 2 criteria
- What is the function of FormulaR1C1?
- Compiler Error: User-defined types not defined
- Open a workbook using FileDialog and manipulate it in Excel VBA
- Vba Excel do vlookup from a closed file
- excel hyperlink to nothing
- How to send files via HTTP_POST with Excel using VBA?
- How to Add Date Picker To VBA UserForm
- Vba macro to copy row from table if value in table meets condition
- Difference between Thisworkbook.name and Activeworkbook.name in VBA
- Set a cell value from a function
- How to determine if a date falls on the weekend?
- Calling regasm without administrative rights for COM interop in Excel VBA
- Is there a way for DIR(path) in VBA to handle strings longer than 260?
- How do I activate a specific workbook and a specific sheet?
- Delete all data rows from an Excel table (apart from the first)
- Start VBA macro when editing a cell
- Copy an entire worksheet to a new worksheet in Excel 2010