Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to get a macro to work, but quite surprisingly what I
thought would have been the simplest part of the code just doesn't want to work. I wrote a macro that 1. Selects a sheet in the workbook 2. Selects a range of cells and copies them (simple text, no formulae) 3. Opens an existing workbook 4. Creates a new sheet naming it with the current date At this point it should paste the data in the clipboard onto the new sheet, but instead I get this annoying "Runtime error 438 - Property or method not supported by object" message, followed by the yellow line of death over the last line of my code. I am quite new to VB, and am a bit lost. Can anybody help? Thank you for any suggestions. Here's my code Sub Copy_to_fix Dim fix fix = "G:\AREA GRUPPO...\3-5 fix.xls" Sheets("last settori").Select ActiveWorkbook.ActiveSheet.Range("B1:AU1200").Copy Workbooks.Open filetoopen Windows("3-5 fix.xls").Activate ActiveWindow.WindowState = xlMaximized Sheets.Add.Move after:=Sheets(Sheets.Count) Sheets("Foglio1").Name = Format(Date, "DD MMM YY") ActiveCell.Paste ***YELLOW LINE OF DEATH*** End sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
Paste method error in macro | Excel Discussion (Misc queries) | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
error running a paste macro | Excel Worksheet Functions | |||
Macro to paste error | Excel Programming |