Discussion Locked

Excel/VBA - specific sheet to sheet copy

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I allow a user to select a cell while my macro is running? For example, the basic "sum" function in excel allows the user to choose what range of cells to add.

What I'm trying to do is run a macro that will copy from one user selected range to another user selected range on another page. The problem is that there will be any number of pages and the title of these pages will vary.

Can anyone help?

3 replies

by dklippert

Thisis not the exact answer, but it may point you in the right direction. This only picks up the first cell, you'll have to adapt to pick up the range.

http://j-walk.com/ss/excel/tips/tip81.htm

One suggestion from Tom Ogilvy in the forums is something like:

Sub
Windows("Client Update Database.xls").Activate
set userrange = Application.Inputbox(type:=8)
Windows("Client Update Form.xls").Activate
Range("D4").Resize(userrange.rows.count, userrange.columns.count).Value = userrange.Value
End Sub

This discussion is closed to new replies.