Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() In my earlier post I got this code for adding the content of th specified excel sheet. But where as this code is directly copying th worksheet and adding it to my current opened worksheet. But what I wan to do is copy the data..and add it to my currently opened workshee below the current data. I dont know if i have explained it correctly or not. But here is th code which i got for referance. Sub testme() Dim myFileName As Variant Dim newwkbk As Workbook Dim CurWks As Worksheet myFileName = Application.GetOpenFilename("excel files, *.xls") If myFileName = False Then Exit Sub End If Set CurWks = ActiveSheet Set newwkbk = Workbooks.Open(Filename:=myFileName) newwkbk.Worksheets.Copy befo=CurWks newwkbk.Close savechanges:=False End Sub Please help. -- Sylvi ----------------------------------------------------------------------- Sylvia's Profile: http://www.excelforum.com/member.php...fo&userid=3030 View this thread: http://www.excelforum.com/showthread.php?threadid=50099 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet formula incorrect after copying to another worksheet | Excel Worksheet Functions | |||
Looking up a variable in one worksheet and copying information from another column to another worksheet?? | Excel Discussion (Misc queries) | |||
Copying a worksheet witrh protected cells to a new worksheet | Excel Worksheet Functions | |||
Multiple Worksheet copying to a master worksheet | Excel Programming | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming |