Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Paste Special and Linking | Excel Discussion (Misc queries) | |||
Paste link problem | Excel Worksheet Functions | |||
Problem with Paste Special | Excel Discussion (Misc queries) | |||
Can't Copy and Paste between Excel 2003 Workbooks | Excel Discussion (Misc queries) | |||
Problem with delays in Cut (Cntl-C) and Paste (Ctrl-V) in Excel | Excel Discussion (Misc queries) |