ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Effecting Formatting (https://www.excelbanter.com/excel-programming/348481-macro-effecting-formatting.html)

whornak

Macro Effecting Formatting
 
When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.

Jim Thomlinson[_5_]

Macro Effecting Formatting
 
Are you toggling the application settings for calculation and screen updating
without resetting them?

Application.Screenupdating = True
application.calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"whornak" wrote:

When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.


whornak

Macro Effecting Formatting
 
Utilizing the With/EndWith I am setting the following to false at beginning
and back to true at end.

.ScreenUpdating = True
.DisplayAlerts = True

"Jim Thomlinson" wrote:

Are you toggling the application settings for calculation and screen updating
without resetting them?

Application.Screenupdating = True
application.calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"whornak" wrote:

When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.


Jim Thomlinson[_5_]

Macro Effecting Formatting
 
Do you use any End(s) in your code that may be causing the code to end before
these lines are reached? Do you have any error handling code that would be
circumventing reaching those 2 lines of code.

I assume that your calaculation is set to automatic. Tools -Options
-Calculation
--
HTH...

Jim Thomlinson


"whornak" wrote:

Utilizing the With/EndWith I am setting the following to false at beginning
and back to true at end.

.ScreenUpdating = True
.DisplayAlerts = True

"Jim Thomlinson" wrote:

Are you toggling the application settings for calculation and screen updating
without resetting them?

Application.Screenupdating = True
application.calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"whornak" wrote:

When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.


whornak

Macro Effecting Formatting
 
No error trapping and no way to avoid hitting those 2 lines of code.
Calculations are set to automatic.

"Jim Thomlinson" wrote:

Do you use any End(s) in your code that may be causing the code to end before
these lines are reached? Do you have any error handling code that would be
circumventing reaching those 2 lines of code.

I assume that your calaculation is set to automatic. Tools -Options
-Calculation
--
HTH...

Jim Thomlinson


"whornak" wrote:

Utilizing the With/EndWith I am setting the following to false at beginning
and back to true at end.

.ScreenUpdating = True
.DisplayAlerts = True

"Jim Thomlinson" wrote:

Are you toggling the application settings for calculation and screen updating
without resetting them?

Application.Screenupdating = True
application.calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"whornak" wrote:

When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.


whornak

Macro Effecting Formatting
 
In doing some testing I found that when I perform the following steps I can
reproduce the error. Without running any code.

1) Create new workbook
2) Copy data from Access XP result set by: Select all then copy
3) Paste into workbook
4) Formatting issue appears.

"whornak" wrote:

No error trapping and no way to avoid hitting those 2 lines of code.
Calculations are set to automatic.

"Jim Thomlinson" wrote:

Do you use any End(s) in your code that may be causing the code to end before
these lines are reached? Do you have any error handling code that would be
circumventing reaching those 2 lines of code.

I assume that your calaculation is set to automatic. Tools -Options
-Calculation
--
HTH...

Jim Thomlinson


"whornak" wrote:

Utilizing the With/EndWith I am setting the following to false at beginning
and back to true at end.

.ScreenUpdating = True
.DisplayAlerts = True

"Jim Thomlinson" wrote:

Are you toggling the application settings for calculation and screen updating
without resetting them?

Application.Screenupdating = True
application.calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"whornak" wrote:

When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.


Jim Thomlinson[_5_]

Macro Effecting Formatting
 
Try using an ADODB recordset to retrive the values from the Database.
--
HTH...

Jim Thomlinson


"whornak" wrote:

In doing some testing I found that when I perform the following steps I can
reproduce the error. Without running any code.

1) Create new workbook
2) Copy data from Access XP result set by: Select all then copy
3) Paste into workbook
4) Formatting issue appears.

"whornak" wrote:

No error trapping and no way to avoid hitting those 2 lines of code.
Calculations are set to automatic.

"Jim Thomlinson" wrote:

Do you use any End(s) in your code that may be causing the code to end before
these lines are reached? Do you have any error handling code that would be
circumventing reaching those 2 lines of code.

I assume that your calaculation is set to automatic. Tools -Options
-Calculation
--
HTH...

Jim Thomlinson


"whornak" wrote:

Utilizing the With/EndWith I am setting the following to false at beginning
and back to true at end.

.ScreenUpdating = True
.DisplayAlerts = True

"Jim Thomlinson" wrote:

Are you toggling the application settings for calculation and screen updating
without resetting them?

Application.Screenupdating = True
application.calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"whornak" wrote:

When creating a new workbook, inserting code that will apply
formatting/filtering/sorting/calculations, insert result set into sheet,
launch macro: I experience some weird results.

1) At most but not all calculations don't work even thought the formula
appears correct.
2) All cells, including those involved in the formula, won't show the format
dialog when: Right click, select Format Cells, GET NOTHING.

Excel 2000.



All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com