Hello again, Im struglling with this one and I hope to get some help. I have to update a workbook but it can have many different names. I basically want the person who has to press the update button to be presented with a list of open workbooks from which they can select and Excel would make that the active workbook.
Hope this is easier than it sounds. I have tried to create a userform with the following but I have a feeling I am way off on this one.
Thanks
Sub Test1()
Dim wb As Workbook, x As String
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then x = wb.Name
Next wb
MsgBox "The other open workbook is named " & x & "." & vbCrLf & _
"Click OK to activate it."
Workbooks(x).Activate
End Sub
Hope this is easier than it sounds. I have tried to create a userform with the following but I have a feeling I am way off on this one.
Thanks
Sub Test1()
Dim wb As Workbook, x As String
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then x = wb.Name
Next wb
MsgBox "The other open workbook is named " & x & "." & vbCrLf & _
"Click OK to activate it."
Workbooks(x).Activate
End Sub