LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DonT
 
Posts: n/a
Default Problem with paste

I've just started trying to learn Visual Basic so this is alittle above my
skill level
I need to be able to select the starting cell on the 1st sheet "customer's
name
and then paste it on the 2nd sheet on a cell of my chosing

Private Sub CommandButton1_Click()

Dim Msg, Style, Title, Response
Msg = "Do you want to move a customer to the 2nd worksheet ?"
Style = vbYesNo + vbQuestion
Title = "Move customer command!!"
Response = MsgBox(Msg, Style, Title)


If Response = vbYes Then
'select the worksheet to be active
Sheets("Sheet1").Activate
'select the customer to be moved
Set startingcell = Application.InputBox(prompt:="Select a customer",
Left:=150, Top:=5, Type:=8)
'this copy's the customer's name in the selected cell
startingcell.Copy
'move to sheet 2
Sheets("sheet2").Activate
'select where to paste the customer
Set endingcell = Application.InputBox(prompt:="Select a cell",
Left:=150, Top:=5, Type:=8)

'this will paste the customer in the current cell
endingcell.Paste

When I run this I get a run time error "438"
object doesn't support this property or method

Thank you
Don


 
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
Paste Special and Linking ajkim001 Excel Discussion (Misc queries) 8 March 14th 06 02:10 PM
Paste link problem Norm Shea Excel Worksheet Functions 2 January 18th 06 03:28 AM
Problem with Paste Special Mike W Excel Discussion (Misc queries) 2 May 5th 05 03:50 PM
Can't Copy and Paste between Excel 2003 Workbooks wllee Excel Discussion (Misc queries) 6 March 30th 05 02:59 PM
Problem with delays in Cut (Cntl-C) and Paste (Ctrl-V) in Excel Girl from Tacoma Excel Discussion (Misc queries) 0 December 10th 04 02:55 AM


All times are GMT +1. The time now is 02:18 PM.

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

About Us

"It's about Microsoft Excel"