View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default I can't get my macro to run!

Hi NickNick,

Check that the userform is named frmComments.

If the workbook did not contain a userform named frmComments, you would
receive the encountered error.


---
Regards,
Norman



"NickNick" wrote in
message ...

I'm sure the answer to this is straightforward, but I can't find out
where I'm going wrong! I've done a bit of VB in Excel but it's all been
very simple.

I've followed the "Create User Form Turtorial" from this site and
adapted it as I needed to. I'm assigning the macro to a button and need
to create a new module (according to the tutorial) and this is what I've
entered for the module.

Sub OpenCommentsandDiscipline()
frmComments.Show
End Sub

frmComments is the name of the User Form I've created. When I try and
run the macro I get a "Run-time error 424 Object Required" The
debugger goes straight to frmComments.Show and highlights it.

I can't see what the problem is... :(


--
NickNick
------------------------------------------------------------------------
NickNick's Profile:
http://www.excelforum.com/member.php...o&userid=25520
View this thread: http://www.excelforum.com/showthread...hreadid=504182