Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

is validation of excel cells possible on the web?

is validation of excel cells possible on the web?

is validation of excel cells possible on the web?

I am creating a web form with an excel sheet in a notes database

The form opens in excel and an excel sheet appears.

i have managed to format cells paste values etc..

What i cant get working is validating a cell

I am not sure if it is supported in excel on the web?

i am trying to use a validation of length of the cell'
This is the code i have been meddling with to get working

Does validation work in this object?

'Validation Code
With ss.Range("C6:C25").Validation
    .Add Type:=xlValidateTextLength,  AlertStyle:=xlValidAlertStop, Operator:=xlLessEqual, Formula1:="20"   'Syntax error is generated here
    .IgnoreBlank = True
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = "Error"
    .InputMessage = ""
    .ErrorMessage = "Too many charcters"
    .ShowInput = True
    .ShowError = True
End With

Anyway my working code is below  the above code i have been inserting before the end sub in the SetupSpreadsheet

Create the spreadsheet object.


  Dim c ' For spreadsheet constants.

  Sub Window_OnLoad

' Window_OnLoad fires when the form is first composed, opened, or refreshed.
' Here, the spreadsheet is formatted and filled with formulas.
' If the expense report already exists, existing values are also inserted
' into the spreadsheet.


End Sub

Sub SetupSpreadsheet

' SetupSpreadsheet applies the formatting to the sheet.

  Set c = ss.Constants

    with ss

' The ExpenseTemplate is a page created in this database.  It has a table
' on it that has the headings and formulas for the spreadsheet.  Binding
' the expense report form to the ExpenseTemplate, eliminates the need to set
' the headings and formulas in this code.
      .DataType = "HTMLURL"
      .HTMLURL = "<Computed Value>/ExpenseTemplate?OpenPage"

' Make some general settings for the overall sheet.
      .ViewableRange = "A1:i30"
      .DisplayHorizontalScrollBar = False
      .DisplayVerticalScrollBar = False
      .DisplayRowHeaders = False
      .DisplayColHeaders = False
      .DisplayToolBar = False
      .TitleBar.Caption = " Expense Report for "
'     .range("H1:H19").autofitcolumns
      .MaxHeight = "100%"
      .MaxWidth = "100%"
      .AutoFit = True

' Draw a black border around the spreadsheet.  Note the use of c -- spreadsheet constants.
      .range("A1:A30").Borders(c.ssEdgeLeft).Weight = c.owcLineWeightThick
      .range("A1:A30").Borders(c.ssEdgeLeft).Color = "DarkBlue"
      .range("A30:I30").Borders(c.ssEdgeBottom).Weight = c.owcLineWeightThick
      .range("A30:I30").Borders(c.ssEdgeBottom).Color = "DarkBlue"
      .range("I1:I30").Borders(c.ssEdgeRight).Weight = c.owcLineWeightThick
      .range("I1:I30").Borders(c.ssEdgeRight).Color = "DarkBlue"

' Set some number formats on the spreadsheet.
      .range("A6:A25").NumberFormat = "dd-mmm-yy"            
      .range("I28:I30").NumberFormat = "Currency"

' Align some titles to the right.
      .range("A5:I5").HAlignment = c.ssHAlignCenter
      .range("H28:H30").HAlignment = c.ssHAlignRight

' Protect the sheet so unlocked cells work.

' Unlock cells so user can enter data.

' Validation Code goes here

End With
End Sub

if anyone can help me get this working or tell me if this method works on the web then i would be very appreciative.



RE: is validation of excel cells possible on the web?

hmm, i think you have CVS confused with CSV. it happens to me too.

RE: is validation of excel cells possible on the web?

oh sorry, you posted it somewhere else already

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close