moving between multiple wokbooks

mszakalinski

New Member
Joined
Oct 29, 2013
Messages
3
hi,

im facing problem operating between two different unsaved workbooks, read a lot about possible solutions but still cant find good one. Macro should select and copy sheets to a new added workbook or opened from file workbook (both workbooks have sheet kennzahlen), switching between those workbooks is for me unclear, can anyone have a look why this code doesnt work? i set wwb1 and wwb2 as public to use them in other macros this module

Public wwb1 As Workbook
Public wwb2 As Workbook
Sub macro1()


Set wwb1 = ActiveWorkbook
wwb1.Activate
wwb1.Sheets("Kennzahlen").Select
ActiveSheet.Cells.Copy
Set wbb2 = Workbooks.Open(Filename:= _
"C:\Users\sds\Desktop\Moje dokumenty\1.xls")



wwb1.Sheets("Kennzahlen").Activate
wwb2.Sheets("Kennzahlen").Activate
wwb1.Sheets("Kennzahlen").Activate
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,215,398
Messages
6,124,693
Members
449,179
Latest member
kfhw720

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top