Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Recorded macro won't run

I recorded a simple macro to copy data from a worksheet and paste it into a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something I
just recorded will not run. Am I missing a reference library or something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Recorded macro won't run

It has to do with Showcase Query and it is really not necessary for whatever
you are doing. Just confirm that you have your Showcase query menu and you
are good to go. If you do not have the menu then you can just re-boot your
Excel and it will come back...

"RobinTaylor" wrote:

I recorded a simple macro to copy data from a worksheet and paste it into a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something I
just recorded will not run. Am I missing a reference library or something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Recorded macro won't run

Thanks for you quick response, Jim. My showcase menu is there, so that's all
good. But even if I remove that line and run the macro, the other recorded
line crashes. This one:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

I get runtime error 1004:
Pastespecial method of range Class failed.


"Jim Thomlinson" wrote:

It has to do with Showcase Query and it is really not necessary for whatever
you are doing. Just confirm that you have your Showcase query menu and you
are good to go. If you do not have the menu then you can just re-boot your
Excel and it will come back...

"RobinTaylor" wrote:

I recorded a simple macro to copy data from a worksheet and paste it into a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something I
just recorded will not run. Am I missing a reference library or something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Recorded macro won't run

Here is the macro:

ActiveCell.Range("A1:D28").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

"Don Guillett" wrote:

Post the rest of your macro. Somehow you may have selected something that
took your copy away.

--
Don Guillett
SalesAid Software

"RobinTaylor" wrote in message
...
I recorded a simple macro to copy data from a worksheet and paste it into

a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something

I
just recorded will not run. Am I missing a reference library or

something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Recorded macro won't run

A couple of possible problems but it is hard to fix without seeing the rest
of the code. Post the entire macro and we can take a look.

"RobinTaylor" wrote:

Thanks for you quick response, Jim. My showcase menu is there, so that's all
good. But even if I remove that line and run the macro, the other recorded
line crashes. This one:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

I get runtime error 1004:
Pastespecial method of range Class failed.


"Jim Thomlinson" wrote:

It has to do with Showcase Query and it is really not necessary for whatever
you are doing. Just confirm that you have your Showcase query menu and you
are good to go. If you do not have the menu then you can just re-boot your
Excel and it will come back...

"RobinTaylor" wrote:

I recorded a simple macro to copy data from a worksheet and paste it into a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something I
just recorded will not run. Am I missing a reference library or something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Recorded macro won't run

Welcome to a bug in Excel 2000. There is no xlColumnWidths. Try this code...

Check out this link...
http://support.microsoft.com/default...b;en-us;231090

Here is some code that should work for you...

ActiveCell.Range("A1:D28").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues
Selection.PasteSpecial Paste:=xlFormats
Selection.PasteSpecial Paste:=8

HTH

"RobinTaylor" wrote:

Here is the macro:

ActiveCell.Range("A1:D28").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

"Don Guillett" wrote:

Post the rest of your macro. Somehow you may have selected something that
took your copy away.

--
Don Guillett
SalesAid Software

"RobinTaylor" wrote in message
...
I recorded a simple macro to copy data from a worksheet and paste it into

a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something

I
just recorded will not run. Am I missing a reference library or

something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Recorded macro won't run

Well, gee whiz! Guess they though we wouldn't need that one anymore!

Thanks for all your help. I appreciate it!

"Jim Thomlinson" wrote:

Welcome to a bug in Excel 2000. There is no xlColumnWidths. Try this code...

Check out this link...
http://support.microsoft.com/default...b;en-us;231090

Here is some code that should work for you...

ActiveCell.Range("A1:D28").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues
Selection.PasteSpecial Paste:=xlFormats
Selection.PasteSpecial Paste:=8

HTH

"RobinTaylor" wrote:

Here is the macro:

ActiveCell.Range("A1:D28").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

"Don Guillett" wrote:

Post the rest of your macro. Somehow you may have selected something that
took your copy away.

--
Don Guillett
SalesAid Software

"RobinTaylor" wrote in message
...
I recorded a simple macro to copy data from a worksheet and paste it into
a
new blank worksheet. In the recorded code was the line:

Application.Run Range("ScOnWindow")

When I ran the code, I got an error on this line. Normally I remove these
"sconwindow" lines from the code anyway, but it concerns me that something
I
just recorded will not run. Am I missing a reference library or
something?
It will also crash on the following recorded line:

Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated! Thanks!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Recorded macro Gaurav[_3_] Excel Discussion (Misc queries) 4 September 22nd 08 06:46 PM
How to FIX Recorded Macro JMay Excel Discussion (Misc queries) 7 May 23rd 07 04:13 AM
Recorded Macro want to know New Users to Excel 5 February 14th 07 12:46 PM
I recorded a macro, how can i share it with others? TA Excel Worksheet Functions 1 September 8th 06 08:09 PM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"