View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_3_] Otto Moehrbach[_3_] is offline
external usenet poster
 
Posts: 31
Default Paste Clipboard from Word to last row in excel

J
There is no range in the code I gave you that needs to be set. Excel
highlighted the Sub or Function when it said it wasn't defined. What was
that? Include your code in your response. Don't attach your file. HTH
Otto
"J" wrote in message
om...
I inserted the code:
Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial
after the excel sheet is opened and I get a 'Compile Error: Sub or
Function not defined...
Do I have to set the range in a statement above?


"Otto Moehrbach" wrote in message

...
Something like this would work:
Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial
Watch out for line wrapping. All the above code is on one line. HTH
Otto
"J" wrote in message
om...
Hi all!
I am rather new to vb script so would appreciate any help you could
give!
I have used macro recorder and some script to manipulate a word doc so
that non-essential characters are deleted (this info comes from a web
form) . Then I have the macro copy all the text on the page and open
an excel sheet called Master_file.xls which has all the information
displayed in columns B1:G1 such that B1 is Customer_Name, C1 is
Address etc. In the column A* is a counter which increments if any
text exists in B* (eg =IF(B7<"",A6+1,"")).
Problem is, I would like to search for the last row which is empty and
insert the contents of the clipbord in B* through G*.
I am having a difficult time so far so any help would be greatly
appreciated!

Thanks!