PASTE ON FOCUS CELL ?

  • Thread starter Thread starter Disperso
  • Start date Start date
D

Disperso

see this example

[B14] = filename

I want to paste the variable filename on the actual cell selected (not b14).
How i can modify the this string?

thanks
 
Disperso, use activecell
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
other example (simply copy&paste macro)
..
How i can substitute "G13" with the activecell ?

Sub Macro2()

Range("D9").Select
Selection.Copy
Range("G13").Select
ActiveSheet.Paste

End Sub


Disperso said:
this mode ?

[Activecell] = filename


Disperso, use activecell
Disperso said:
see this example

[B14] = filename

I want to paste the variable filename on the actual cell selected (not b14).
How i can modify the this string?

thanks
 
Sub Macro2()

Range("D9").Copy _
destination:=activecell

End Sub

without doing the selecting.

or

Sub Macro2A()

dim myCell as range
set mycell = Activecell

Range("D9").Select
Selection.Copy
mycell.Select
ActiveSheet.Paste

End Sub

(I think the first is much easier to understand.)



other example (simply copy&paste macro)
.
How i can substitute "G13" with the activecell ?

Sub Macro2()

Range("D9").Select
Selection.Copy
Range("G13").Select
ActiveSheet.Paste

End Sub

Disperso said:
this mode ?

[Activecell] = filename


Disperso, use activecell
see this example

[B14] = filename

I want to paste the variable filename on the actual cell selected (not
b14).
How i can modify the this string?

thanks
 
thanks ;)

Dave Peterson said:
Sub Macro2()

Range("D9").Copy _
destination:=activecell

End Sub

without doing the selecting.

or

Sub Macro2A()

dim myCell as range
set mycell = Activecell

Range("D9").Select
Selection.Copy
mycell.Select
ActiveSheet.Paste

End Sub

(I think the first is much easier to understand.)



other example (simply copy&paste macro)
.
How i can substitute "G13" with the activecell ?

Sub Macro2()

Range("D9").Select
Selection.Copy
Range("G13").Select
ActiveSheet.Paste

End Sub

Disperso said:
this mode ?

[Activecell] = filename


"Paul B" <[email protected]> ha scritto nel messaggio

Disperso, use activecell

see this example

[B14] = filename

I want to paste the variable filename on the actual cell selected (not
b14).
How i can modify the this string?

thanks
 
Back
Top