Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
BER BER is offline
external usenet poster
 
Posts: 29
Default Macros will not work when sheet e-mailed

I have created macros stored in all open workbooks and they work perfectly
but when I e-mail the workbook it will not work for other users, if they
access it or copy it from a common folder it works for them but I need to
e-mail it to multiple users. they are getting run time error '1004' Insert
method of range class failed and when I debug the line that fails in each
macro is
Selection.Insert Shift:=xlDown Help please I am not good at VBA code is
below

Rows("36:36").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=9
Range("A36:G36").Select
Selection.Interior.ColorIndex = xlNone
Rows("36:36").RowHeight = 17.25
Range("A36").Select
ActiveWindow.SmallScroll Down:=-15
Range("B20").Select
Selection.Copy
Range("A36").Select
ActiveSheet.Paste
Range("B36").Select
Application.CutCopyMode = False
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
BER BER is offline
external usenet poster
 
Posts: 29
Default Macros will not work when sheet e-mailed

no Joel this does not solve it my macros work except when e-mailed to another
user and I cannot understand why HELP

"joel" wrote:

You should specify the worksheet and workbook to make sure it works. If this
code is part of worksheet change you don't need the sheet name.

with thisworkbook.sheets("Sheet1")
.Rows("36:36").Insert Shift:=xlDown
.Range("A36:G36").Interior.ColorIndex = xlNone
.Rows("36:36").RowHeight = 17.25
.Range("B20").Copy _
destination:=.Range("A36")
end with


"Ber" wrote:

I have created macros stored in all open workbooks and they work perfectly
but when I e-mail the workbook it will not work for other users, if they
access it or copy it from a common folder it works for them but I need to
e-mail it to multiple users. they are getting run time error '1004' Insert
method of range class failed and when I debug the line that fails in each
macro is
Selection.Insert Shift:=xlDown Help please I am not good at VBA code is
below

Rows("36:36").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=9
Range("A36:G36").Select
Selection.Interior.ColorIndex = xlNone
Rows("36:36").RowHeight = 17.25
Range("A36").Select
ActiveWindow.SmallScroll Down:=-15
Range("B20").Select
Selection.Copy
Range("A36").Select
ActiveSheet.Paste
Range("B36").Select
Application.CutCopyMode = False
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macros will not work when sheet e-mailed

There is nothing in this part of the code that would give a 1004 error. You
need to find out what line gets highlighted when the rror occurs. This code
is not creting the error.

"Ber" wrote:

no Joel this does not solve it my macros work except when e-mailed to another
user and I cannot understand why HELP

"joel" wrote:

You should specify the worksheet and workbook to make sure it works. If this
code is part of worksheet change you don't need the sheet name.

with thisworkbook.sheets("Sheet1")
.Rows("36:36").Insert Shift:=xlDown
.Range("A36:G36").Interior.ColorIndex = xlNone
.Rows("36:36").RowHeight = 17.25
.Range("B20").Copy _
destination:=.Range("A36")
end with


"Ber" wrote:

I have created macros stored in all open workbooks and they work perfectly
but when I e-mail the workbook it will not work for other users, if they
access it or copy it from a common folder it works for them but I need to
e-mail it to multiple users. they are getting run time error '1004' Insert
method of range class failed and when I debug the line that fails in each
macro is
Selection.Insert Shift:=xlDown Help please I am not good at VBA code is
below

Rows("36:36").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=9
Range("A36:G36").Select
Selection.Interior.ColorIndex = xlNone
Rows("36:36").RowHeight = 17.25
Range("A36").Select
ActiveWindow.SmallScroll Down:=-15
Range("B20").Select
Selection.Copy
Range("A36").Select
ActiveSheet.Paste
Range("B36").Select
Application.CutCopyMode = False
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Macros will not work when sheet e-mailed

What version of Excel is on the systems that work and don't work? There
are Excel 2007 things that may need to be addressed.

"Ber" wrote:

no Joel this does not solve it my macros work except when e-mailed to another
user and I cannot understand why HELP

"joel" wrote:

You should specify the worksheet and workbook to make sure it works. If this
code is part of worksheet change you don't need the sheet name.

with thisworkbook.sheets("Sheet1")
.Rows("36:36").Insert Shift:=xlDown
.Range("A36:G36").Interior.ColorIndex = xlNone
.Rows("36:36").RowHeight = 17.25
.Range("B20").Copy _
destination:=.Range("A36")
end with


"Ber" wrote:

I have created macros stored in all open workbooks and they work perfectly
but when I e-mail the workbook it will not work for other users, if they
access it or copy it from a common folder it works for them but I need to
e-mail it to multiple users. they are getting run time error '1004' Insert
method of range class failed and when I debug the line that fails in each
macro is
Selection.Insert Shift:=xlDown Help please I am not good at VBA code is
below

Rows("36:36").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=9
Range("A36:G36").Select
Selection.Interior.ColorIndex = xlNone
Rows("36:36").RowHeight = 17.25
Range("A36").Select
ActiveWindow.SmallScroll Down:=-15
Range("B20").Select
Selection.Copy
Range("A36").Select
ActiveSheet.Paste
Range("B36").Select
Application.CutCopyMode = False
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
BER BER is offline
external usenet poster
 
Posts: 29
Default Macros will not work when sheet e-mailed

Thanks all got it working I needed to put a line in to unprotect and re
protect and now its working on all versions. Many thanks.

"Barb Reinhardt" wrote:

What version of Excel is on the systems that work and don't work? There
are Excel 2007 things that may need to be addressed.

"Ber" wrote:

no Joel this does not solve it my macros work except when e-mailed to another
user and I cannot understand why HELP

"joel" wrote:

You should specify the worksheet and workbook to make sure it works. If this
code is part of worksheet change you don't need the sheet name.

with thisworkbook.sheets("Sheet1")
.Rows("36:36").Insert Shift:=xlDown
.Range("A36:G36").Interior.ColorIndex = xlNone
.Rows("36:36").RowHeight = 17.25
.Range("B20").Copy _
destination:=.Range("A36")
end with


"Ber" wrote:

I have created macros stored in all open workbooks and they work perfectly
but when I e-mail the workbook it will not work for other users, if they
access it or copy it from a common folder it works for them but I need to
e-mail it to multiple users. they are getting run time error '1004' Insert
method of range class failed and when I debug the line that fails in each
macro is
Selection.Insert Shift:=xlDown Help please I am not good at VBA code is
below

Rows("36:36").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=9
Range("A36:G36").Select
Selection.Interior.ColorIndex = xlNone
Rows("36:36").RowHeight = 17.25
Range("A36").Select
ActiveWindow.SmallScroll Down:=-15
Range("B20").Select
Selection.Copy
Range("A36").Select
ActiveSheet.Paste
Range("B36").Select
Application.CutCopyMode = False
End Sub

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
Macros will not work when sheet e-mailed joel Excel Programming 0 May 1st 09 11:09 AM
Personal.xls macros will not work in any other sheet Kevin Excel Programming 1 October 21st 08 11:43 PM
Personal.xls macros will not work in any other sheet Kevin Excel Programming 1 October 21st 08 08:34 PM
Personal.xls macros only work in that sheet Kevin Excel Programming 0 October 3rd 08 12:55 PM
links within excel don't work when workbook is e-mailed - why ? E. Nufizinuf Excel Discussion (Misc queries) 1 December 13th 05 04:00 AM


All times are GMT +1. The time now is 01:13 PM.

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"