The VBA ‘Int’ type is a signed 16-bit field so it can only hold values from -32768 to +32767. Change those variables to ‘Long’, which is a signed 32-bit field and can hold values from -2147483648 to +2147483647. Should be enough for Excel. 😉
More Related Contents:
- delete Autofilter Field resullt using the header Name
- Somehow it’s not copying [closed]
- VBA macro that search for file in multiple subfolders
- So, I have 6 “master” files to then divide into 40 separate files
- Getting ScriptControl to work with Excel 2010 x64
- Application.Match gives type mismatch
- Count and Highlight keywords within phrases
- Transpose a range in VBA
- Protecting cells in Excel but allow these to be modified by VBA script
- Saving excel worksheet to CSV files with filename+worksheet name using VB [duplicate]
- Detect merged cells in VBA Excel with MergeArea
- Using VBA code, how to export Excel worksheets as image in Excel 2003?
- Parse HTML content in VBA
- How to add a DocumentProperty to CustomDocumentProperties in Excel?
- How do I name a spreadsheet automatically, by referencing two cells?
- Excel VBA Delete Rows
- VBA EXCEL To Prompt User Response to Select Folder and Return the Path as String Variable [duplicate]
- Should I turn .CutCopyMode back on before exiting my sub procedure?
- VBA: How to delete filtered rows in Excel?
- Determine whether user is adding or deleting rows
- Removing the password from a VBA project
- Removing special characters VBA Excel
- Excel VBA Formula German/French/Italian/Russian/Dutch/Foreign Function
- Iterate over slicer via VBA and select a single item each time
- Loop through Excel Sheets
- VBA Password Input with Cancel Function
- Finding first blank row, then writing to it
- How to have vba execute every 10 minutes?
- Read and write from/to registry in VBA
- Unable to read data from a CSV using ADO due to the driver thinking I am working with integers/number and showing nulls instead of text