ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unique Excel Web Page / Macro situation - HELP! (https://www.excelbanter.com/excel-programming/297375-unique-excel-web-page-macro-situation-help.html)

Pendig

Unique Excel Web Page / Macro situation - HELP!
 
Here's my situation: I work in Human Resources and am developing a wa
to post our company's open job positions on our company intranet.
Without purchasing any specialized software, I figured an easy way t
do this would be to publish an Excel .htm page on the Intranet.

I've created the Excel web file with the .htm extension and to edit i
I simply open it from within Excel or right-click Open With
Microsoft Excel. The file appears to be a regular Excel file.
However, when launched directly, the file opens in Internet Explorer.
Great...just how I want it. However...

Each job posting has a "Status" column in which I've written a formul
to automatically calculate the "Status" of the current posting based o
today's date and the positions "Date Posted". If more than 30 day
old, the position's Status will change to "Archived" In order to kee
track of the old positions we've posted, we don't want to simply delet
the entries from the sheet. I figured I could just use an AutoFilte
to hide the rows I didn't want on the final output .htm file. Thi
works great. However...

The .htm file is static, and I need the file to be updated every day t
automatically change the status column and update the filter to exclud
any unwanted positions from the .htm file on the web. I can't seem t
come up with the way to do this. I've thought of several ways, bu
these aren't proving to be good solutions:

- Write a macro contained within the .htm file that auto-starts.
wrote some code that performs the filter and save into a "Private Su
Workbook_Open()" sub, and even assigned a trusted digital signature t
it so it wouldn't prompt me to "Enable Macros" every time. The macr
runs whenever I open the workbook - AS EXCEL. It wil NOT run wheneve
I open the file from the Intranet (as a .htm file), thereby leaving th
.htm as a static, unupdated file.

- I thought about writing a simple batch script that will open the .ht
file AS Excel, and then putting this batch script on my proces
scheduler on my own computer and leaving my computer on all the time.
This isn't a good way to do it I'm guessing, not to mention I don'
know how to write the batch script syntax to open the HTM file withi
Excel instead of Internet Explorer.


Does anyone know of a good way to do this? If you need the code tha
is being executed upon Workbook Open, it is:

Private Sub Workbook_Open()

'Filters "Status Filter" column to hide all Archive and Future Rows
Range("E4:E5").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="x"
Columns("D:E").Select
Range("E1").Activate
Selection.EntireColumn.Hidden = True
Range("A1").Select
ActiveWorkbook.Save

End Sub

Like I said, that macro works fine. It's triggering it that is th
problem. Any help would be greatly appreciated

--
Message posted from http://www.ExcelForum.com


Pendig[_2_]

Unique Excel Web Page / Macro situation - HELP!
 
Can anyone help me with this please

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:50 AM.

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