Sub Show Form () Error

bbworld

New Member
Joined
Jul 29, 2019
Messages
10
Hello,

I am a newbie with VBA and have reviewed the previous articles on the Sub Show Form () error I am getting in the attached.

I have followed a learning video and rechecked my content twice yet the same error is presenting.

The workbook is attached and the code in particular that is causing grief is;

Sub Showform()

frmForm.Show

End Sub

I have checked the declaration on the Sub and it matches the code.

Seriously at a loss.
 

Attachments

  • Sub Error.PNG
    Sub Error.PNG
    5.4 KB · Views: 268

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I have ran the newer code from @VBE313 and attached are the errors/issues/my newbie oversights.
I asked you what error you got with your original code.
 
Upvote 0
Runtime Error 13 (Google tells me this is a very generic error code)

when you go to debug, it highlighted the code I had entered to show the form.
 
Upvote 0
Ok in the VB editor select tools > Options > General > Check "Break in class module" > OK.
The run the code again, when you click debug it should take you to the line that is causing the problem.
 
Upvote 0
This is the line that was highlighted.

This is in the lesson (checked the video content twice)

Not sure why this has changed from the show.form.

Cheers
D
 

Attachments

  • Debug Error.PNG
    Debug Error.PNG
    125.5 KB · Views: 159
Upvote 0
Remove the space between the counta & the (
VBA Code:
   irow = [counta(database!A:A)]
 
Upvote 0
That has worked. Thank you Fluff.

What a huge difference a space makes.

Another QQ if I may?

In the User Details frame, the identifier, I was trying some code to generate a alphanumeric key that is unique. (Say hex, 8 characters)

Private Sub txtPW_Change()

Dim strPassword As String

Dim i As Integer

End Sub

I have this within the frmForm section.

Q1. Would this code generate a random alphanumeric key?

Q2. Is this code in the correct section, frmForm?
 
Upvote 0
That code won't do anything at all, all you have done is declared two variables.
But to get help on that, you will need to start a new thread.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top