borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Como cargar dlls de verdad dinámicamente? (para hacer plugins))Next Topic (Besoin d\'aide!!!  Des ping dans un thread semble impossibles!!) New Topic New Poll Post Reply
AndreaVB Forum : Non-English ONLY : Indirizzo selezione celle
Poster Message
scaglio
Level: Protégé

Registered: 06-11-2004
Posts: 5

icon Indirizzo selezione celle

Cari amici,
sono un principiante di VBA per Excel. Vorrei scrivere una macro che mi permetta gestire un intervallo di celle che vengono selezionate dall'utente.
Come faccio ad esempio a indirizzarmi alle varie celle della selezione?

Es.: l'utente seleziona l'intervallo B1:C5 e chiama la macro.
Io vorrei che la macro scrivesse "NOME" nella cella C1 (ultima cella in alto a destra della selezione).
Come faccio?


Grazie mille a chi mi vorrŕ dare un aiuto,

Scaglio.

06-11-2004 at 11:39 AM
View Profile Send Email to User Show All Posts | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: Indirizzo selezione celle

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  Cells(Target.Row, Target.Columns(Target.Columns.Count).Column).Value = "NOME"
End Sub

Riporto la risposta anche nel forum in inglese. Ciao

____________________________
Real Programmer can count up to 1024 on his fingers

09-11-2004 at 12:29 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Non-English ONLY : Indirizzo selezione celle
Previous Topic (Como cargar dlls de verdad dinámicamente? (para hacer plugins))Next Topic (Besoin d\'aide!!!  Des ping dans un thread semble impossibles!!) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder