LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro in Excel causes problems when spreadsheet is opened in IE

Hi!
I am having problems with an Excel spreadsheet that has couple buttons
to perform filtering functions when opened through the Internet
Explorer. The spreadsheet is a link on the website. When the end-user
clicks the link, the Excel, embedded in the IE window opens (first
asking if the end-user wants to save or open the file). Most end-users
choose to just open the file.
The spreadsheet has two buttons - to filter and to remove filter. The
reason I do not want the end-users to use the Excel filtering or find
fuctions is because the list is very large and not all of the items are
listed in the Filter drop-down box. The end-users are not too familiar
with the Excel Filter Custom function and there are too users to train.
The problem is when the user closes the file and then opens it again,
you get either of the messages: A document with the faile name
"xxx.xls" is already open. You cannot open two documents wit hteh same
name, even if the documents are in different folders OR Do you want to
save this file? thie file you are downloading cannot be opened by the
default program. It is either corrupted or it has an incorrect file
type. In both cases, the file doesn't open (the window is blank).

Below is the code for the buttons:
Sub SupplierButton()
Dim Supplier As String
Supplier = InputBox(prompt:="Enter Supplier CODE. Make sure NOT to
include SUPPLIER SUFFIX (00,01, etc). You can enter a full or partial
code. For example, entering 'Graybar' will display all bundles that
belong to 'GRAYBARELE'.")
Range("a2").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="*" & Supplier & "*"
ActiveWindow.ScrollRow = 1
End Sub
Sub RemoveFilterButton()
Selection.AutoFilter Field:=1
End Sub

I found on the web that VBA doesn't work well in a spreadsheet that's
embedded in the IE, but couldn't track the solution.

Any suggestions?

Thank you in advance!

 
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
Newly opened spreadsheet doesn't display in Excel 2007 kwdavids Excel Discussion (Misc queries) 2 June 19th 08 04:39 PM
Have macro run automatically as soon as excel is opened. Dtown Dawg Excel Programming 2 May 30th 06 11:21 PM
spreadsheet with macro does not work in Excel 2000 opened in Internet Explorer jt54 Excel Programming 0 April 5th 06 09:14 PM
How do I find an Excel spreadsheet opened as attachment in Outlook Irv K. Excel Discussion (Misc queries) 1 November 28th 05 06:24 PM
Problems with Auto_Close when opening spreadsheet from a macro L2B[_2_] Excel Programming 1 November 4th 05 04:41 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"