Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Hiding Columns running slow

Hello everyone. This might sound like a real dumb question but it is my first
time using vb in excel. I created a form that allows users to hide columns by
using the checkboxes on the form. That piece of the code works fine problem
is when I format the worksheet onload it slows down the column hidding
tremendously. The format setting are as follows:

Worksheets("Report Data").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Report Data").PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PrintGridlines = True

I am sure these settings are what are causing the slow down because when I
comment them out it begins to run fast again. I also tried each one
individually, it seems to be something with PageSetup. The code above is in
the onload of the workbook. If anybody has any suggestions I would really
appreciate it.

  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Hiding Columns running slow

This may help some:

With Worksheets("Report Data").PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.PrintGridlines = True
End With


"Armando" wrote:

Hello everyone. This might sound like a real dumb question but it is my first
time using vb in excel. I created a form that allows users to hide columns by
using the checkboxes on the form. That piece of the code works fine problem
is when I format the worksheet onload it slows down the column hidding
tremendously. The format setting are as follows:

Worksheets("Report Data").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Report Data").PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PrintGridlines = True

I am sure these settings are what are causing the slow down because when I
comment them out it begins to run fast again. I also tried each one
individually, it seems to be something with PageSetup. The code above is in
the onload of the workbook. If anybody has any suggestions I would really
appreciate it.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Hiding Columns running slow

Thanks for the help but I am still having the same situation.

"JMB" wrote:

This may help some:

With Worksheets("Report Data").PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.PrintGridlines = True
End With


"Armando" wrote:

Hello everyone. This might sound like a real dumb question but it is my first
time using vb in excel. I created a form that allows users to hide columns by
using the checkboxes on the form. That piece of the code works fine problem
is when I format the worksheet onload it slows down the column hidding
tremendously. The format setting are as follows:

Worksheets("Report Data").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Report Data").PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PrintGridlines = True

I am sure these settings are what are causing the slow down because when I
comment them out it begins to run fast again. I also tried each one
individually, it seems to be something with PageSetup. The code above is in
the onload of the workbook. If anybody has any suggestions I would really
appreciate it.

  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Hiding Columns running slow

I'm afraid I don't know much else that can be done with it.

"Armando" wrote:

Thanks for the help but I am still having the same situation.

"JMB" wrote:

This may help some:

With Worksheets("Report Data").PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.PrintGridlines = True
End With


"Armando" wrote:

Hello everyone. This might sound like a real dumb question but it is my first
time using vb in excel. I created a form that allows users to hide columns by
using the checkboxes on the form. That piece of the code works fine problem
is when I format the worksheet onload it slows down the column hidding
tremendously. The format setting are as follows:

Worksheets("Report Data").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Report Data").PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PrintGridlines = True

I am sure these settings are what are causing the slow down because when I
comment them out it begins to run fast again. I also tried each one
individually, it seems to be something with PageSetup. The code above is in
the onload of the workbook. If anybody has any suggestions I would really
appreciate it.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Hiding Columns running slow

Armando,
..PageSetup properties always seem to take an age
See if any of this helps:
http://groups.google.co.uk/group/mic...cc8762 a48cba

Watch for line wrap.

NickHK

"Armando" wrote in message
...
Hello everyone. This might sound like a real dumb question but it is my

first
time using vb in excel. I created a form that allows users to hide columns

by
using the checkboxes on the form. That piece of the code works fine

problem
is when I format the worksheet onload it slows down the column hidding
tremendously. The format setting are as follows:

Worksheets("Report Data").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Report Data").PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PrintGridlines = True

I am sure these settings are what are causing the slow down because when

I
comment them out it begins to run fast again. I also tried each one
individually, it seems to be something with PageSetup. The code above is

in
the onload of the workbook. If anybody has any suggestions I would really
appreciate it.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Hiding Columns running slow

Well I gave it a shot and it still slowed down the program. It slows it down
quite a bit. With out either pagesetup or excel4macro it runs in under a sec.
, with either on it takes around 30 to 40 secs. Well I really appreciate
everyone's help. If you still have any suggestions they are completey welcome.

"NickHK" wrote:

Armando,
..PageSetup properties always seem to take an age
See if any of this helps:
http://groups.google.co.uk/group/mic...cc8762 a48cba

Watch for line wrap.

NickHK

"Armando" wrote in message
...
Hello everyone. This might sound like a real dumb question but it is my

first
time using vb in excel. I created a form that allows users to hide columns

by
using the checkboxes on the form. That piece of the code works fine

problem
is when I format the worksheet onload it slows down the column hidding
tremendously. The format setting are as follows:

Worksheets("Report Data").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Report Data").PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PaperSize = xlPaperLegal
ActiveSheet.PageSetup.PrintGridlines = True

I am sure these settings are what are causing the slow down because when

I
comment them out it begins to run fast again. I also tried each one
individually, it seems to be something with PageSetup. The code above is

in
the onload of the workbook. If anybody has any suggestions I would really
appreciate it.




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
Workbook running VERY slow kippers Excel Discussion (Misc queries) 1 February 1st 07 03:27 PM
Slow Performance Hiding Rows Fid Excel Programming 6 June 22nd 05 09:46 PM
Worksheet Running Very Slow Dmorri254 Excel Worksheet Functions 4 February 3rd 05 04:49 PM
slow down a running macro terry down Excel Programming 2 August 30th 03 10:42 PM


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