Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SLP SLP is offline
external usenet poster
 
Posts: 58
Default Excel VBA works fine but not in two workbooks. Help

I have some code in Excel that works fine all the time but suddenly, it won't
work in two workbooks that are generated from the Office Link in Access. To
make matters worst, it work fine yesterday in the two workbooks. I have no
idea what is going on. Can anyone help? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Excel VBA works fine but not in two workbooks. Help

Other than taking a wild guess, you don't provide nearly enough
information to diagnose a problem.

What does the macro do (post it in a reply if it's not too long). What
type of data does it operate on? Do you see the same problem if you
generate another workbook (other than the two problem ones)?

What changed in your Access, Office Link, or XL setup?



In article ,
SLP wrote:

I have some code in Excel that works fine all the time but suddenly, it won't
work in two workbooks that are generated from the Office Link in Access. To
make matters worst, it work fine yesterday in the two workbooks. I have no
idea what is going on. Can anyone help? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
SLP SLP is offline
external usenet poster
 
Posts: 58
Default Excel VBA works fine but not in two workbooks. Help

The macro copies the content of a cell down to the last used cell in the
column to the left.

Sub Filldown()
Range ("E1").Select
If IsEmpty(ActiveCell) Then Exit Sub
Range(ActiveCell, Cells(Rows.Count, _
ActiveCell.Column - 1).End(xlUp).Offset(0, 1)).FillDown
End Sub

In my case, I use this to copy a formula in E1 down. What is happening in
the two workbooks is that the actual value of cell E1 is getting copied
instead of the formula. The code works fine in all my other workbooks just
the two that get generated from Access.

Nothing has changed in my database or setup.

It is really baffeling to me. Any help would be appreciated. Thanks.

"JE McGimpsey" wrote:

Other than taking a wild guess, you don't provide nearly enough
information to diagnose a problem.

What does the macro do (post it in a reply if it's not too long). What
type of data does it operate on? Do you see the same problem if you
generate another workbook (other than the two problem ones)?

What changed in your Access, Office Link, or XL setup?



In article ,
SLP wrote:

I have some code in Excel that works fine all the time but suddenly, it won't
work in two workbooks that are generated from the Office Link in Access. To
make matters worst, it work fine yesterday in the two workbooks. I have no
idea what is going on. Can anyone help? Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
SLP SLP is offline
external usenet poster
 
Posts: 58
Default Excel VBA works fine but not in two workbooks. Help

Let me clarify a little more. When you run the code, what you see in all
rows in Column E is what the value of the formula in cell E1 is. But if you
go into each individual cell in Column E, you will see that the formula did
get copied correctly but is now showing the proper results. If you manually
enter the formula in say E3, you get the right results.

"SLP" wrote:

The macro copies the content of a cell down to the last used cell in the
column to the left.

Sub Filldown()
Range ("E1").Select
If IsEmpty(ActiveCell) Then Exit Sub
Range(ActiveCell, Cells(Rows.Count, _
ActiveCell.Column - 1).End(xlUp).Offset(0, 1)).FillDown
End Sub

In my case, I use this to copy a formula in E1 down. What is happening in
the two workbooks is that the actual value of cell E1 is getting copied
instead of the formula. The code works fine in all my other workbooks just
the two that get generated from Access.

Nothing has changed in my database or setup.

It is really baffeling to me. Any help would be appreciated. Thanks.

"JE McGimpsey" wrote:

Other than taking a wild guess, you don't provide nearly enough
information to diagnose a problem.

What does the macro do (post it in a reply if it's not too long). What
type of data does it operate on? Do you see the same problem if you
generate another workbook (other than the two problem ones)?

What changed in your Access, Office Link, or XL setup?



In article ,
SLP wrote:

I have some code in Excel that works fine all the time but suddenly, it won't
work in two workbooks that are generated from the Office Link in Access. To
make matters worst, it work fine yesterday in the two workbooks. I have no
idea what is going on. Can anyone help? Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Excel VBA works fine but not in two workbooks. Help

One way:

With Range("E1:E" & Range("D" & Rows.Count).End(xlUp).Row)
.Formula = .Cells(1).Formula
End With


In article ,
SLP wrote:

The macro copies the content of a cell down to the last used cell in the
column to the left.

Sub Filldown()
Range ("E1").Select
If IsEmpty(ActiveCell) Then Exit Sub
Range(ActiveCell, Cells(Rows.Count, _
ActiveCell.Column - 1).End(xlUp).Offset(0, 1)).FillDown
End Sub

In my case, I use this to copy a formula in E1 down. What is happening in
the two workbooks is that the actual value of cell E1 is getting copied
instead of the formula. The code works fine in all my other workbooks just
the two that get generated from Access.

Nothing has changed in my database or setup.

It is really baffeling to me. Any help would be appreciated. Thanks.

"JE McGimpsey" wrote:

Other than taking a wild guess, you don't provide nearly enough
information to diagnose a problem.

What does the macro do (post it in a reply if it's not too long). What
type of data does it operate on? Do you see the same problem if you
generate another workbook (other than the two problem ones)?

What changed in your Access, Office Link, or XL setup?



In article ,
SLP wrote:

I have some code in Excel that works fine all the time but suddenly, it
won't
work in two workbooks that are generated from the Office Link in Access.
To
make matters worst, it work fine yesterday in the two workbooks. I have
no
idea what is going on. Can anyone help? Thanks.




  #6   Report Post  
Posted to microsoft.public.excel.programming
SLP SLP is offline
external usenet poster
 
Posts: 58
Default Excel VBA works fine but not in two workbooks. Help

Thanks very much. Worked like a charm. Any ideas though on why my code
wouldn't work in those two workbooks?

"JE McGimpsey" wrote:

One way:

With Range("E1:E" & Range("D" & Rows.Count).End(xlUp).Row)
.Formula = .Cells(1).Formula
End With


In article ,
SLP wrote:

The macro copies the content of a cell down to the last used cell in the
column to the left.

Sub Filldown()
Range ("E1").Select
If IsEmpty(ActiveCell) Then Exit Sub
Range(ActiveCell, Cells(Rows.Count, _
ActiveCell.Column - 1).End(xlUp).Offset(0, 1)).FillDown
End Sub

In my case, I use this to copy a formula in E1 down. What is happening in
the two workbooks is that the actual value of cell E1 is getting copied
instead of the formula. The code works fine in all my other workbooks just
the two that get generated from Access.

Nothing has changed in my database or setup.

It is really baffeling to me. Any help would be appreciated. Thanks.

"JE McGimpsey" wrote:

Other than taking a wild guess, you don't provide nearly enough
information to diagnose a problem.

What does the macro do (post it in a reply if it's not too long). What
type of data does it operate on? Do you see the same problem if you
generate another workbook (other than the two problem ones)?

What changed in your Access, Office Link, or XL setup?



In article ,
SLP wrote:

I have some code in Excel that works fine all the time but suddenly, it
won't
work in two workbooks that are generated from the Office Link in Access.
To
make matters worst, it work fine yesterday in the two workbooks. I have
no
idea what is going on. Can anyone help? Thanks.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Excel VBA works fine but not in two workbooks. Help

Then you probably have calculation set to manual. Change it back to
automatic (Tools/Options/Calculation)


In article ,
SLP wrote:

Let me clarify a little more. When you run the code, what you see in all
rows in Column E is what the value of the formula in cell E1 is. But if you
go into each individual cell in Column E, you will see that the formula did
get copied correctly but is now showing the proper results. If you manually
enter the formula in say E3, you get the right results.

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
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 gromit12 Excel Discussion (Misc queries) 2 November 6th 07 09:30 PM
Visual Basic Function works fine in Excell 2003 but not in Excel 2 Roger Excel Discussion (Misc queries) 8 August 1st 07 03:56 AM
Pivot table is not valid in Excel 2000 but works fine in EXCEL 200 Ulrik Loves Horses Excel Discussion (Misc queries) 1 December 18th 06 03:08 PM
Works fine in debug, but... DiBaco Excel Programming 5 February 24th 06 04:35 PM
Automation error -2147417848 on windows 98 while using excel in VB ( works fine in XP) Sudhanshu Jain Excel Programming 1 November 5th 04 04:41 PM


All times are GMT +1. The time now is 06:56 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"