Exporting Last line of data

iainIOW

New Member
Joined
Jan 27, 2005
Messages
8
Hi! My first post on this board..!!

Im looking to create a procedure in Excel that looks at the last row of a list of data and exports to bookmarks in Word. IM sure i have done this before, but have not come across the problem of variable cells..
My spreadsheet has 6 Columns, and data is entered in the cells below. At the moment, the user has to write the data out again in a word document (as a letter).

Anyone got any ideas on how to do this? Im more of an access VBA man, but unfortunatly my users dont have access!! :LOL:
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
hi

to get the bottom row used in the sheet

try

Code:
ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1

jindon
 
Upvote 0
comes back with "object does not support property or method" ive attached that code to the onclick property of a button on my sheet.
 
Upvote 0
ttt

ive got all of the code to get the data over in to the right place in word.. i just cant get excel to work out that it needs to get data from the last row that has been used..

i.e i could code it to look like this: -

.Goto What:=wdGoToBookmark, Name:="Address2"
.TypeText Text:=Range("D2")

But obviously the range D2 wont always be the same, it will be Dn (where n is the last used row number)

Any ideas? appreciate your help.
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,212
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top