Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
I need to switch between worobooks, but i never know the name of one of them. Dim Nome As Workbook Set Nome = ActiveWorkbook.FullName Range("A2").Select Selection.CurrentRegion.Select Selection.Copy Windows("ordenação para folha final.xls").Activate Sheets("Original 1").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A1").Select Windows("Nome").Activate Range("A1").Select Can anyone help me with this? i can ´t get this to work... one more thing the code is in another book that is open... Thansk a lot!!!!!!!!!!!! SpeeD |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The best way is to get familiar with workbook objects.
dim wbk1 as workbook dim wbk2 as workbook set wbk1 = activeworkbook set wbk2 = workbooks("MyBook.xls") 'the book where the code is running can always be refered to as ThisWorkbook wbk1.activate msgbox "You are here' wbk2.activate msgbox "Now here" thisworkbook.activate msgbox "and back to here" -- HTH... Jim Thomlinson "SpeeD" wrote: Hi. I need to switch between worobooks, but i never know the name of one of them. Dim Nome As Workbook Set Nome = ActiveWorkbook.FullName Range("A2").Select Selection.CurrentRegion.Select Selection.Copy Windows("ordenação para folha final.xls").Activate Sheets("Original 1").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A1").Select Windows("Nome").Activate Range("A1").Select Can anyone help me with this? i can ´t get this to work... one more thing the code is in another book that is open... Thansk a lot!!!!!!!!!!!! SpeeD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
switching between workbooks | Excel Programming | |||
Switching between Workbooks | Excel Discussion (Misc queries) | |||
Switching between workbooks | Excel Programming | |||
Switching between workbooks | Excel Discussion (Misc queries) | |||
Switching Between 2 workbooks using VBA | Excel Programming |