views:

35

answers:

0

Hi there,

Backstory:

I've been building a back-end CMS/database for a client to manage his bar's ever changing drink menu, however the CMS/database will no be ready for use for a while, and thus I also need a temporary solution to help update the website's menu.

Situation:

The client prints the bar's menus daily from a formated Excel sheet, 5 columns wide and as many as 80 rows long. I made an Excel macro that exports all selected rows/columns within a selected range as an HTML (w/ CSS formating) file and us server-side include to mount the html file on the page.

Problem:

The Formated Excel Sheet has a footer and an advertisement for another a special the client does not want on the site. How do you exclude a particular line?

Current Code:

 Sub Beer_Menu()

Dim PageName As String, FirstRow As Integer, LastRow As Integer
Dim FirstCol As Integer, LastCol As Integer, MyBold As Byte
Dim TempStr As String, MyRow As Integer, MyCol As Integer
Dim Formats As Variant, Vtype As Integer, MyPageTitle As String

Formats = Array("", "dd mmm yy", "£#,##0", "0%", "1 2 3")

PageName = "d:\tempm.htm" 'location and name of saved file MUST have " .htm "
MyPageTitle = Range("A1").Value

FirstRow = 1 ' first line 
LastRow = 85 ' last line 
LastCol = 5 ' 

If UBound(Formats) carrot (LastCol - FirstCol + 1) Then MsgBox "The 'Formats' array has insufficient elements", vbOKOnly + vbCritical, "XXXXX_Menu"
Exit Sub
End If