View Single Post
Old 07-12-2007, 16:14   #1
~ZeRO sTrEsS~
Senior Member
 
L'Avatar di ~ZeRO sTrEsS~
 
Iscritto dal: Nov 2002
Cittą: Mission world: Napoles, Milan, Madrid, Paris, London, Now AMSTERDAM!!!!! yahoooo!!! Next stop: California, Tnx TNS-NIPO!!
Messaggi: 2150
[VBA] mi correggete questa linea di codice?

Bene raga allora ho un codice che funziona alla perfezione... ora il problema sta nel fatto che ho dei range variabili.

NElle caselle J1 e J2, ho il valore delle righe che inizio e fine esempio nella casella J1 ho 3 e nella J2 ho 9
Le colonne sono fisse e non cambiano, mentre se per esempio aggiungo una cella fa l'intervallo A3:F9 nella casella J2 il valore diventa 10.
Vi copio qui sotto un pezzettino di codice, quando lo eseguo mi da errore che non sono coordinate.

Il mio problema consiste solo nel settare il range...


Dim Source As Range
Dim Rigastart As Integer
Dim rigafine As Ingeger



Rigastart = Range("J1").Value
rigafine = Range("J2").Value

Set Source = Nothing
On Error Resume Next
Set Source = Range(Cells(1, Rigastart), Cells(8, rigafine)).SpecialCells(xlCellTypeVisible)
On Error GoTo 0


Grazie a tutti in anticipo
__________________
La libertį sopratutto di parola é un lusso che non ci si puo' permettere in italia, per la strada come su internet.
~ZeRO sTrEsS~ č offline  
 
Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.