Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this script
public tMonths Sub LoadMonths() Set shtMesi = Workbooks(w).Sheets(sht) LastRow = shtM.Cells.SpecialCells(xlCellTypeLastCell).Row LastCol = shtM.Cells(1, 255).End(xlToLeft).Column ReDim tMonths(LastRow, LastCol) For R = 1 To LastRow For C = 1 To LastCol tMonths(R, C) = shtMesi.Cells(R C) Next next end sub If i write this public tMonths Sub LoadMonths() Dim lRange As Range Dim tMonths as Variant Set lRange = workbooks(w).sheets(sht).Range(range) tMonths = lRange.value end sub and i try to call from another macro i get error using tMonths What do i wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dim vs. Public | Excel Programming | |||
Array of Public Arrays | Excel Programming | |||
How to reference a public array (declared in module) from a proced | Excel Programming | |||
declaring a public array | Excel Programming | |||
Public Array | Excel Programming |