Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RunTime Error 1004 on online userform using Excel

Status
Not open for further replies.

phil5529

Technical User
Nov 9, 2007
10
GB
Hi

Ive been making a huge form for the last few days to use on the internet!

What it is is like an application form. i have used several userforms that you fill in all the required information into and when submitted all the information is transferred to a printable version that will be legally accepted.

I dont have a great deal of VB knowledge but i have had enough to get by untill now.

to make things more difficult i have used coding to recognise passwords and usernames so when typed in it automatically fills in all of their personal details.

when you hit the submit button it takes you to the pages where all the information you have entered is on the form.

BUT.... (The Problem)


when you enter your username and password into the userform on excel it takes you to the second userform with all info filled in that you have entered before but on the online version (which is just simply the excel document uploaded to the internet so it opens from an internet page,) it comes up with the error message RunTime 1004 and doesnt even open the second userform to enter information yourself so you have to use the button 'i am new to you' to load the 2nd userform, thus not making use at all of the coding i stressfully made to use a password and username function.



also when you hit the 'Submit' button after filling in the userform it doesnt go to the appropriate page. it still fills in the pritable form but you have to go to the worksheet mannualy after it displays the box displaying RunTime 91 which most of our users would not have a clue that they need to do that!

I am very gratefull to anybody who takes the time to read this and thank them in advance and anybody who can help.

I have included a link to the form but there our two functions that are not working yet but i doubt they will come up. i have unprotected so that you can really look into it. the password to get into the VB is Canon21

If you save it to your computer it works fine but if you open it from the internet. thats when the problems occur.



Mamy Many Thanks

Phil
 




You have given a shotgun description. What we need is a sharp-shooter rifle description.

"it comes up with the error message RunTime 1004 "

on exactly what statement?

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Aside of reference to some code in 'personal.xls' that has to be transferred to the workbook, you need to change the way you work with sheets. A spreadsheed opened in IE does not have any windows in excel (try Application.Windows.Count in immediate window). As a consequence, any call to 'ActiveSomething' fails, as it refers to active window.

combo
 
Okey.

Thank you.

I have changed my personal modules to the workbook now.

SkipVought, exactly whaqt information would you like me to provide. i know that i threw information around the place but i will happily rewrite it or say what is needed to help. thanks SkipVought.

Combo, Yes thank you i have changed the personal to the workbook. and i understamd what you are saying is the problem. but i am not sure on how to go about using your resolution.

i can post the codes of what doesn't seem to be working on the online version if you like.

Thank you for taking you time with me

Regards

Phil
 
Something else i just discovered which i find VERY strange....

It works absolutley perfectly when opening from the internet if you have Excel2007!

But its Excel 2003 it doesn't work online with.

Very strange.

Any ideas

Regards

Phil
 
As a first step you could replace ActiveSheet with ThisWorkbook.ActiveSheet.

combo
 
okey i have done that!

it didnt seem to change much but now when you hi the submit button at the end of the form it freezes the webpage and userform page and stops the programs responding.

regards

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top