Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default copy cell after resize method in VBA

Dear all,

I am new to VBA, and going to make a label form for junior, thanks to Norman
Jones , Bob Phillips and Mangesh_yadav for their advise . They made me have
a good begining.

I am going to copy cell A1 and paste into A2 and A3 once the user choose
something from the drop down list at Col A by using Private Sub
Worksheet_Change method.

Now everything seems fine and the formatting in A1 is perfect, but I want
the format in A1 would be paste into my target cell (A2 and A3),not only the
value, and the follow code seems can not do this.

Is there any body can help?

Thanks

My coding :

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo xit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range("A1:b12")) Is Nothing Then

If Not IsEmpty(Target) Then

With Target.Font
.Name = "Arial"
.FontStyle = "standard"
.Size = 18

End With

With Target.Characters(Start:=1, Length:=11).Font
.Name = "Arial"
.FontStyle = "standard"
.Size = 28
End With

Application.CutCopyMode = False

With Target
.Copy
.Resize(1, 2).Offset(0, 1) = .Value
End With

Application.CutCopyMode = ture
End If
End If
xit:
Application.EnableEvents = True
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Copy/Paste fails using Offset & Resize of myRange? [email protected] Excel Discussion (Misc queries) 3 November 21st 06 02:06 AM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 4 June 6th 06 04:46 AM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 0 March 15th 06 10:34 AM
Copy Method Rowan[_2_] Excel Programming 4 April 15th 05 08:48 AM
resize method Tim McPhillips Excel Programming 3 August 11th 03 10:43 PM


All times are GMT +1. The time now is 12:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"