Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
here is code that will assign the other workbook name to a variable call wbn. this will work if you have ONLY 2 workbooks open. if you have a personal or addin open also, then this will give you problems. Sub listwb() Dim wb As Workbook Dim wbn As String For Each wb In Application.Workbooks If wb.Name < ThisWorkbook.Name Then wbn = wb.Name MsgBox wbn 'test purposes only End If Next wb End Sub regards FSt1 "MarkS" wrote: Hi, I have two workbooks open to find the first workbooks name I use ThisWorkBook.Name to problem is to find the other workbooks name. I need to copy some data from the second workbook to the first workbook, the name of the second workbook always changes Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and replace in workbooks | New Users to Excel | |||
find same amount in different workbooks | Excel Worksheet Functions | |||
using find in 2 or 3 workbooks that are open | Excel Discussion (Misc queries) | |||
find open workbooks | Excel Programming | |||
find workbooks with macros | Excel Programming |