Paste Special

R

RHall

When using "Paste Special" sometimes I get the full selection menu and
sometimes I only get a choice for unicode or text. What determines which one
I get?
Also, when I "paste special" requesting "Values" in a recorded macro the
receiving worksheet moves columns to the right of my paste to the left. I
pasted in columns "A" & "B" and it moved a formula in column "H" to "F".
What's going on?
Also, when recording the macro it does not capture the "NO" to saving the
file when closing it. I don't want my user to have the option to save it
since the macro used a filter selection.
Thanks for any help. RHall
 
D

Dave Peterson

If you have two workbooks open in two different instances of excel, then you'll
see this "funny" paste special dialog.

Opening both the workbooks in one instance of excel will get your "normal" paste
special dialog back.

Without seeing the code that you used, I wouldn't guess at the second question.

And for the third question, you can close the workbook like:

someworkbook.close savechanges:=false 'or true

to avoid any prompt.
 
G

Gord Dibben

In addition to Dave's comments................

You will also get the text and unicode options if you have copied to the Windows
clipboard and not the Office clipboard.

i.e. copy the text from this post and paste special to Excel will give you the
unicode, text options.


Gord Dibben MS Excel MVP
 
R

RHall

This is the code that I used for my 2 question. Thanks for the other help.

ChDir "C:\Documents and Settings\User\My Documents\Roberts Cert Payroll"
Workbooks.Open Filename:= _
"C:\Documents and Settings\User\My Documents\Roberts Cert
Payroll\Employee Data.xls"
Range("A2:b99").Select
Selection.Copy
Windows("Time Sheet 3-D.xls").Activate
Range("A5:b102").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Windows("Employee Data.xls").Activate
ActiveWorkbook.Close
Range("C5").Select
 
D

Dave Peterson

I don't see anything that looks like it would cause columns to be inserted.

Does it happen each time you run the code?


This is the code that I used for my 2 question. Thanks for the other help.

ChDir "C:\Documents and Settings\User\My Documents\Roberts Cert Payroll"
Workbooks.Open Filename:= _
"C:\Documents and Settings\User\My Documents\Roberts Cert
Payroll\Employee Data.xls"
Range("A2:b99").Select
Selection.Copy
Windows("Time Sheet 3-D.xls").Activate
Range("A5:b102").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Windows("Employee Data.xls").Activate
ActiveWorkbook.Close
Range("C5").Select
 

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

Top