Print Page | Close Window

Name redefined - Dim strFormName

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21595
Printed Date: 28 March 2026 at 11:06pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Name redefined - Dim strFormName
Posted By: andyc209
Subject: Name redefined - Dim strFormName
Date Posted: 13 October 2006 at 9:45am

I have a page with two forms in for administration purposes, if the user wants to add a new item to the news page the form is shown where new=true. If they are editing the form is shown where edit=true. Both are identical forms just the edit version pulls the exisiting data into the form elements.

I have put the following above each of the 'copy' fields (1 in the 'new' form and 1 in the 'edit' field)
 
 <%
 'Declare the ASP variables used
 Dim strFormName
 Dim strTextAreaName
 
 'ID tag name of the HTML form the textarea is within
 strFormName = "form1"
 
 'ID tag name of HTML textarea being replaced
 strTextAreaName = "copy"
 
 %>
 <!-- include the Web Wiz Rich Text Editor -->
 <!--#include file="RTE_editor_inc.asp" -->
 
but get the error Name redifined Dim strFormName
 
i thought that this would not matter as the asp is choosing only one of the forms, the other is disregarded by a IF ELSE END IF statement.



Replies:
Posted By: WebWiz-Bruce
Date Posted: 13 October 2006 at 10:26am
The error means that you are declaring the variable twice.

You can only have 1 Dim statement for each variable.

In this case you need to remove one of the lines that has:-

Dim strFormName


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net