pastespecial

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Want to cut from worksheet 2 and paste to worksheet 1("Data") been useing
following. Would like to paste without removing validation on sheet 1 paste
special xlvalues etc didn't work rest of procedure works fine
Thanks Much

Selection.Cut
Sheets("Data").Select
ActiveSheet.Paste
 
You can only use PasteSpecial after Copy, not Cut. Not clear exactly what
you re trying to do.

You might need to Copy, PasteSpecial, and then delete the original
selection.
_________________________________________________________________________
 
Thanks much for this tidbit this was not clear to me can do as you suggested
Thanks again
 
Will try to explain better.
Have data sheet click on cell this cell has validation set also shrink to
fit. you then click a option button and go to desc sheet. there a cell is
full size for 232 charters. have user control msg boxes for entry so not ove
232. When user fills cell on desc want to copy back to data sheet. All of
this happens useing procedure I will enclose. Where my problem is I want to
keep valaditation on in data sheet after I copy back from cesc.
This code works from a option button in desc sheet
Hopt this shows better what I am trying to do
Thanks


Option Explicit
Dim cellLength As Integer
Sub active_offset()
'Puts descripition into cell shrink to fit cell
'add code to check for amount of text (232) done
Worksheets("desc").Select
Range("A2").Select
cellLength = Len(ActiveCell)
' msgbox (cellLength)
If msgbox(cellLength & vbNewLine & "The Number above must not be over 232
Please review", _
vbYesNo) = vbYes Then
Exit Sub
Else
Dim Data As Worksheet
Range("a2").Select
Selection.Cut
Sheets("Data").Select
ActiveSheet.Paste
With Selection.Validation
.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlLessEqual, Formula1:="232"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("B2").Select
End If
End Sub
 
Again, what I would do is Copy instead of Cut. Then I would go back to the
original source range and delete it.
_________________________________________________________________________
 
Just a Thank You worked it out
Thanks Again

Vasant Nanavati said:
Again, what I would do is Copy instead of Cut. Then I would go back to the
original source range and delete it.
_________________________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top