Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel with IE problem

Hi,

We are having one Excel file which contain macros. The user has two
options to download this report output file, they can download and
save to harddisk OR open report into browser directly by using Open
command. On the sheet, we gave sort order functionality. The sort
order code work correct when user used Download and Save option.


However when user used open command to open report directly into
browser, report open correct but sort order code not work.


The line where i m getting error is given below


sSheetName = ActiveSheet.Name


Also i m attaching complete code below: Please provide me
solution....


Sheets(sSheetName).Select


' Find Number of Rows
Sheets(sSheetName).Cells(10, 1).Select
intKeyRow = Selection.End(xlDown).Row


Sheets(sSheetName).Range("A9:Q" & intKeyRow).Select
intKeyRow = 9


'Sort by IPTV Column
If FrmTo****ue.optIPTV.Value = True Then
Selection.Sort Key1:=Range("E" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If


'Sort By CPV Column
If FrmTo****ue.optCPV.Value = True Then
Selection.Sort Key1:=Range("F" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
'Sort By Cost Column
If FrmTo****ue.optCost.Value = True Then
Selection.Sort Key1:=Range("H" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
'Sort By Cases Column
If FrmTo****ue.optCases.Value = True Then
Selection.Sort Key1:=Range("I" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
AddRankColumn (sSheetName)
Sheets(sSheetName).Cells(5, 1).Select


Thanks in advance
Ashish

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Excel with IE problem


Change your code to use vb object like Sheet1, Sheet2, etc
Sheets or worksheets collection do no seems to be supported.
regards
JY

wrote in message
ups.com...
Hi,

We are having one Excel file which contain macros. The user has two
options to download this report output file, they can download and
save to harddisk OR open report into browser directly by using Open
command. On the sheet, we gave sort order functionality. The sort
order code work correct when user used Download and Save option.


However when user used open command to open report directly into
browser, report open correct but sort order code not work.


The line where i m getting error is given below


sSheetName = ActiveSheet.Name


Also i m attaching complete code below: Please provide me
solution....


Sheets(sSheetName).Select


' Find Number of Rows
Sheets(sSheetName).Cells(10, 1).Select
intKeyRow = Selection.End(xlDown).Row


Sheets(sSheetName).Range("A9:Q" & intKeyRow).Select
intKeyRow = 9


'Sort by IPTV Column
If FrmTo****ue.optIPTV.Value = True Then
Selection.Sort Key1:=Range("E" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If


'Sort By CPV Column
If FrmTo****ue.optCPV.Value = True Then
Selection.Sort Key1:=Range("F" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
'Sort By Cost Column
If FrmTo****ue.optCost.Value = True Then
Selection.Sort Key1:=Range("H" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
'Sort By Cases Column
If FrmTo****ue.optCases.Value = True Then
Selection.Sort Key1:=Range("I" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
AddRankColumn (sSheetName)
Sheets(sSheetName).Cells(5, 1).Select


Thanks in advance
Ashish



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel with IE problem

Check your other post.

wrote:

Hi,

We are having one Excel file which contain macros. The user has two
options to download this report output file, they can download and
save to harddisk OR open report into browser directly by using Open
command. On the sheet, we gave sort order functionality. The sort
order code work correct when user used Download and Save option.

However when user used open command to open report directly into
browser, report open correct but sort order code not work.

The line where i m getting error is given below

sSheetName = ActiveSheet.Name

Also i m attaching complete code below: Please provide me
solution....

Sheets(sSheetName).Select

' Find Number of Rows
Sheets(sSheetName).Cells(10, 1).Select
intKeyRow = Selection.End(xlDown).Row

Sheets(sSheetName).Range("A9:Q" & intKeyRow).Select
intKeyRow = 9

'Sort by IPTV Column
If FrmTo****ue.optIPTV.Value = True Then
Selection.Sort Key1:=Range("E" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If

'Sort By CPV Column
If FrmTo****ue.optCPV.Value = True Then
Selection.Sort Key1:=Range("F" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
'Sort By Cost Column
If FrmTo****ue.optCost.Value = True Then
Selection.Sort Key1:=Range("H" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
'Sort By Cases Column
If FrmTo****ue.optCases.Value = True Then
Selection.Sort Key1:=Range("I" & intKeyRow),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
End If
AddRankColumn (sSheetName)
Sheets(sSheetName).Cells(5, 1).Select

Thanks in advance
Ashish


--

Dave Peterson
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
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Problem viewing Excel 2003 Pivot Chart fields in Excel 2007 ronny B Charts and Charting in Excel 1 October 24th 08 10:08 PM
Weird problem with Excel 2000...Worksheets disappearing in a shared Excel file BrianL_SF Excel Discussion (Misc queries) 2 October 10th 06 08:27 PM
Weird problem with Excel 2000...Worksheets disappearing in a shared Excel file BrianL_SF Excel Programming 6 October 7th 06 08:54 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM


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