Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default This should be so simple but it's not working, please help

I wrote a "simple" macro to return the screen to normal. It will be a
button the user can click after they've run another macro that hides
some rows and columns. This "simple" macro is supposed to unhide the
columns, unhide the rows, and sort back to the original sort. At first
I only had the unhide and sort, but although it was unhiding all the
rows, it still wasn't showing them. So I added the autofit. But it's
not working still. It will unhide the columns and it will unhide the
rows, but the rows are still invisible because they're coming back as
like size 0 or something. The autofit function works manually but it's
NOT working in the macro. Can anyone see anything wrong with this:

Sub Return_To_Normal()
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
Rows("5:2002").Select
Cells.EntireRow.AutoFit
Selection.sort Key1:=Range("B5"), Order1:=xlAscending,
Key2:=Range("A5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Range("A5").Select
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default This should be so simple but it's not working, please help

try

Sub Return_To_Normal()
rows.hidden=false
columns.hidden=false
Rows("5:2002").AutoFit
'specify your range
range("a5:x2002").sort Key1:=Range("B5"), Order1:=xlAscending, _
Key2:=Range("A5") , Order2:=xlAscending, Header:=xlGuess
End Sub


--
Don Guillett
SalesAid Software

"tahrah" wrote in message
oups.com...
I wrote a "simple" macro to return the screen to normal. It will be a
button the user can click after they've run another macro that hides
some rows and columns. This "simple" macro is supposed to unhide the
columns, unhide the rows, and sort back to the original sort. At first
I only had the unhide and sort, but although it was unhiding all the
rows, it still wasn't showing them. So I added the autofit. But it's
not working still. It will unhide the columns and it will unhide the
rows, but the rows are still invisible because they're coming back as
like size 0 or something. The autofit function works manually but it's
NOT working in the macro. Can anyone see anything wrong with this:

Sub Return_To_Normal()
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
Rows("5:2002").Select
Cells.EntireRow.AutoFit
Selection.sort Key1:=Range("B5"), Order1:=xlAscending,
Key2:=Range("A5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Range("A5").Select
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default This should be so simple but it's not working, please help

Don,

Wierd but it's still doing the same thing. It's unhiding the columns,
but it's NOT unhiding the rows or autofitting them? Now I'm having
another problem and I wonder if it's somehow related. I don't know
what I did, but I cannot use the scroll bar on the right. I can't page
down or page up. Whatever's on the screen when I open the file is all
I can see. I have no idea and don't know what to do to fix it.

Any ideas?

Regards,
Tahrah


Don Guillett wrote:
try

Sub Return_To_Normal()
rows.hidden=false
columns.hidden=false
Rows("5:2002").AutoFit
'specify your range
range("a5:x2002").sort Key1:=Range("B5"), Order1:=xlAscending, _
Key2:=Range("A5") , Order2:=xlAscending, Header:=xlGuess
End Sub


--
Don Guillett
SalesAid Software

"tahrah" wrote in message
oups.com...
I wrote a "simple" macro to return the screen to normal. It will be a
button the user can click after they've run another macro that hides
some rows and columns. This "simple" macro is supposed to unhide the
columns, unhide the rows, and sort back to the original sort. At first
I only had the unhide and sort, but although it was unhiding all the
rows, it still wasn't showing them. So I added the autofit. But it's
not working still. It will unhide the columns and it will unhide the
rows, but the rows are still invisible because they're coming back as
like size 0 or something. The autofit function works manually but it's
NOT working in the macro. Can anyone see anything wrong with this:

Sub Return_To_Normal()
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
Rows("5:2002").Select
Cells.EntireRow.AutoFit
Selection.sort Key1:=Range("B5"), Order1:=xlAscending,
Key2:=Range("A5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Range("A5").Select
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default This should be so simple but it's not working, please help

Okay it's working now for three of the macros. I can run them then run
the "return to normal" macro and all is well. For some reason when I
run the macro that had subtotal calculation, then the "return to
normal" macro doesn't work. Don't know why. So I'm just deleting that
macro. They can print that stuff instead of viewing on the screen.
Thanks for your help.

Regards,
Tahrah


tahrah wrote:
Don,

Wierd but it's still doing the same thing. It's unhiding the columns,
but it's NOT unhiding the rows or autofitting them? Now I'm having
another problem and I wonder if it's somehow related. I don't know
what I did, but I cannot use the scroll bar on the right. I can't page
down or page up. Whatever's on the screen when I open the file is all
I can see. I have no idea and don't know what to do to fix it.

Any ideas?

Regards,
Tahrah


Don Guillett wrote:
try

Sub Return_To_Normal()
rows.hidden=false
columns.hidden=false
Rows("5:2002").AutoFit
'specify your range
range("a5:x2002").sort Key1:=Range("B5"), Order1:=xlAscending, _
Key2:=Range("A5") , Order2:=xlAscending, Header:=xlGuess
End Sub


--
Don Guillett
SalesAid Software

"tahrah" wrote in message
oups.com...
I wrote a "simple" macro to return the screen to normal. It will be a
button the user can click after they've run another macro that hides
some rows and columns. This "simple" macro is supposed to unhide the
columns, unhide the rows, and sort back to the original sort. At first
I only had the unhide and sort, but although it was unhiding all the
rows, it still wasn't showing them. So I added the autofit. But it's
not working still. It will unhide the columns and it will unhide the
rows, but the rows are still invisible because they're coming back as
like size 0 or something. The autofit function works manually but it's
NOT working in the macro. Can anyone see anything wrong with this:

Sub Return_To_Normal()
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
Rows("5:2002").Select
Cells.EntireRow.AutoFit
Selection.sort Key1:=Range("B5"), Order1:=xlAscending,
Key2:=Range("A5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Range("A5").Select
End Sub


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default This should be so simple but it's not working, please help

Glad to help

--
Don Guillett
SalesAid Software

"tahrah" wrote in message
ps.com...
Okay it's working now for three of the macros. I can run them then run
the "return to normal" macro and all is well. For some reason when I
run the macro that had subtotal calculation, then the "return to
normal" macro doesn't work. Don't know why. So I'm just deleting that
macro. They can print that stuff instead of viewing on the screen.
Thanks for your help.

Regards,
Tahrah


tahrah wrote:
Don,

Wierd but it's still doing the same thing. It's unhiding the columns,
but it's NOT unhiding the rows or autofitting them? Now I'm having
another problem and I wonder if it's somehow related. I don't know
what I did, but I cannot use the scroll bar on the right. I can't page
down or page up. Whatever's on the screen when I open the file is all
I can see. I have no idea and don't know what to do to fix it.

Any ideas?

Regards,
Tahrah


Don Guillett wrote:
try

Sub Return_To_Normal()
rows.hidden=false
columns.hidden=false
Rows("5:2002").AutoFit
'specify your range
range("a5:x2002").sort Key1:=Range("B5"), Order1:=xlAscending, _
Key2:=Range("A5") , Order2:=xlAscending, Header:=xlGuess
End Sub


--
Don Guillett
SalesAid Software

"tahrah" wrote in message
oups.com...
I wrote a "simple" macro to return the screen to normal. It will be a
button the user can click after they've run another macro that hides
some rows and columns. This "simple" macro is supposed to unhide the
columns, unhide the rows, and sort back to the original sort. At
first
I only had the unhide and sort, but although it was unhiding all the
rows, it still wasn't showing them. So I added the autofit. But
it's
not working still. It will unhide the columns and it will unhide the
rows, but the rows are still invisible because they're coming back as
like size 0 or something. The autofit function works manually but
it's
NOT working in the macro. Can anyone see anything wrong with this:

Sub Return_To_Normal()
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
Rows("5:2002").Select
Cells.EntireRow.AutoFit
Selection.sort Key1:=Range("B5"), Order1:=xlAscending,
Key2:=Range("A5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortNormal
Range("A5").Select
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
Simple Calculation Not Working JDM Excel Discussion (Misc queries) 2 August 30th 07 04:02 PM
Simple formula NOT working :( Danny Lewis Excel Discussion (Misc queries) 3 August 1st 06 10:33 AM
simple formula not working Charles Shapiro Excel Worksheet Functions 8 July 9th 06 07:56 PM
Very simple function not working ScoTTyBEEE Excel Discussion (Misc queries) 3 October 21st 05 05:43 PM
This should be simple but it's not working for me! hellokitty New Users to Excel 4 April 12th 05 01:26 AM


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