Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Help with copying and pasting from user input


Thanks so much Tom..

It's works perfectly!!!


"Tom Ogilvy" wrote in message
...
Private Sub Userform_Initialize()
Dim sh as Worksheet
for each sh in ActiveWorkbook.Worksheets
if lcase(left(sh.name,9)) = "worksheet" then
Listbox1.AddItem sh.name
end if
Next
End Sub

Private Sub Listbox1_Click()
With Listbox1
if .listindex < -1 then
worksheets(Listbox1.Value).Range("A4:M7").copy _
Destination:=Activecell
end if
End with
End Sub


--
Regards,
Tom Ogilvy

"KimberlyC" wrote in message
...
Hi


I'm trying to write code to make the following happen:

I need the user to be able to copy a specific range (A4:M7) from

another
worksheet in the activeworkbook to the active worksheet that they are

on.

I need them to be able to click a button (once they are viewing the

active
worksheet that they want the range copied to) that will bring up a user

form
displaying the active worksheets in the workbook. Then, I would like for
them to select the worksheet in the userform that they would like to

copy
cells (A4:M7) from...click ok and those cells are pasted to the active
worksheet.
However... in the listbox of active worksheets.. I only want worksheets
listed that start with the name Worksheet, Worksheet (2), Worksheet (3),
.... and so on .. there could be as many as 50 of these worksheets ( and

a
minimum of just Worksheet and Worksheet (2) )depending on how many the

user
has added (they add these worksheets via code I've written).

I'm not sure how to make this all come together...
Any help would be greatly appreciated..
Thanks in advance.
Kimberly






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
Prompt user for input and utilize that input ninner Excel Worksheet Functions 2 March 28th 07 09:44 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
Pasting/Using Input Box Value hindsight Excel Discussion (Misc queries) 3 October 25th 05 02:48 PM
Copying and Pasting Tia Excel Discussion (Misc queries) 4 June 6th 05 08:54 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 03:54 PM.

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"