LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default VB Complie error - can You Help

I have this code which copies data input from 'Adhoc' worksheets cells G9:G15
and copies them onto next available row in 'database' worksheet, column A

Sub copydata()
Application.ScreenUpdating = False
Sheets("Adhoc").Range("G9:G15").Copy
Sheets("database").Select
Range("A65536").End(xlUp).Activate
PasteSpecial = xlValues
Sheets("Adhoc").Activate
Range("G9:G15").ClearContents
Range("G9").Select
MsgBox "Copied to Database Sheet"
Application.ScreenUpdating = True
End Sub

However when I try it, the following bit is highlighted yellow

PasteSpecial = xlValues

and a 'compile error' - Expected function or variable

as I'm the novice (but getting better) anybody fix it for me ??

Thanks
 
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
Complie Error- Argument not optional Roberta Excel Programming 5 April 4th 05 02:31 PM
Complie Error Help JMay Excel Programming 4 January 24th 05 04:33 AM
complie error brian Excel Programming 2 December 13th 04 06:51 PM
Complie Error chris huber Excel Programming 3 January 14th 04 09:57 AM
Variable produces a complie error Btinker Excel Programming 1 November 26th 03 07:53 PM


All times are GMT +1. The time now is 12:15 AM.

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"