Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Paste values in VB

Hi I need some help with the pastevalues for this, which isn't pasting
values...:
Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy Destination:= _
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0)
End Sub

I thank you in advance for your help.

Alex
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Paste values in VB

Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0).PasteSpecial xlValues
End Sub

--
Regards,
Tom Ogilvy

"Alex Martins" wrote in message
...
Hi I need some help with the pastevalues for this, which isn't pasting
values...:
Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy Destination:= _
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0)
End Sub

I thank you in advance for your help.

Alex



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Paste values in VB

Hey Tom, thanks for all your help!

This is giving me an error though...I copied what you sent and it says
"application-defined or Object_defined error".

Do you know what I might be doing wrong?

Thanks again man.
Alex


"Tom Ogilvy" wrote:

Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0).PasteSpecial xlValues
End Sub

--
Regards,
Tom Ogilvy

"Alex Martins" wrote in message
...
Hi I need some help with the pastevalues for this, which isn't pasting
values...:
Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy Destination:= _
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0)
End Sub

I thank you in advance for your help.

Alex




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Paste values in VB


Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial
Paste:=xlPasteValues

Hope that helps


--
kraljb
------------------------------------------------------------------------
kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955
View this thread: http://www.excelforum.com/showthread...hreadid=400915

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Paste values in VB

Hey K...I couldn't make that work...thanks for the help. If you think of
anything else please let me know.

Thanks again for your help!
Alex

"kraljb" wrote:


Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial
Paste:=xlPasteValues

Hope that helps


--
kraljb
------------------------------------------------------------------------
kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955
View this thread: http://www.excelforum.com/showthread...hreadid=400915




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Paste values in VB

Alex,

On sheet BD1, do you have any data in column C in/after row 6? If not, that
would cause the error.

Both of the suggestions worked for me, although I did have to put a line
continuation character (space underscore space) in this one after
PasteSpecial:

Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValues

Regards,

Patti



"Alex Martins" wrote in message
...
Hey K...I couldn't make that work...thanks for the help. If you think of
anything else please let me know.

Thanks again for your help!
Alex

"kraljb" wrote:


Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial
Paste:=xlPasteValues

Hope that helps


--
kraljb
------------------------------------------------------------------------
kraljb's Profile:
http://www.excelforum.com/member.php...fo&userid=9955
View this thread:
http://www.excelforum.com/showthread...hreadid=400915




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Paste values in VB

You would have that problem if there were all empty cells from C6 to the
last cell in that column.

You would have the same problem with your original code.


Sub UpdateBD1()
dim rng as Range
set rng = sheets("BD1").range("C5")
if not isempty(rng) then
if isempty(rng.offset(1,0) then
set rng = rng.offset(1,0)
else
set rng = rng.end(xldown)(2)
end if
Sheets("NEW").Range("K12:O12").Copy
rng.PasteSpecial xlValues
End Sub

--
Regards,
Tom Ogilvy


"Alex Martins" wrote in message
...
Hey Tom, thanks for all your help!

This is giving me an error though...I copied what you sent and it says
"application-defined or Object_defined error".

Do you know what I might be doing wrong?

Thanks again man.
Alex


"Tom Ogilvy" wrote:

Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0).PasteSpecial xlValues
End Sub

--
Regards,
Tom Ogilvy

"Alex Martins" wrote in message
...
Hi I need some help with the pastevalues for this, which isn't pasting
values...:
Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy Destination:= _
Sheets("BD1").Range("C5").End(xlDown) _
.Offset(1, 0)
End Sub

I thank you in advance for your help.

Alex






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
find values in multiple cells and paste row values izzyt1972 Excel Discussion (Misc queries) 5 December 26th 07 10:14 PM
can you change the default paste method? (paste values) David A Brown Excel Discussion (Misc queries) 3 December 18th 07 09:59 AM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM
How do i compare values from two sheet and copy & paste if values match? rozb Excel Programming 0 March 5th 04 12:06 AM
Paste values squirmy Excel Programming 1 December 6th 03 07:38 PM


All times are GMT +1. The time now is 01:04 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"