Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Won't Open up Userform


Hello,

I have created a UserForm for inputing data and I am trying to use
simple macro to open from a button on the sheet. I have done thi
before so I'm not sure why it isn't working. I am creating a module i
the spreadsheet with the following:

Sub OpenInputForm()
frmTrendScoreCard.Show
End Sub

When I click on it it says it is missing an object... Then runs th
DeBugger and highlights the "frmTrendScoreCard.Show" section.

While I have done this before, I'm by no means what I would conside
adept. If I need to add more inforfmaiton

TYIA,

PZa

--
PokerZa
-----------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...fo&userid=2348
View this thread: http://www.excelforum.com/showthread.php?threadid=47731

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Macro Won't Open up Userform

Are you 100% sure that your form is called 'frmTrendScoreCard'?

Not 'fmTrendScoreCard' or some other minor variation?

Simple but most likely!

  #3   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Macro Won't Open up Userform

Right-click the error line "frmTrendScoreCard.Show" and select Definition.
If VBA does not take you anywhere then the form name is probably spelled
wrong (happens all the time!!!)

"PokerZan" wrote:


Hello,

I have created a UserForm for inputing data and I am trying to use a
simple macro to open from a button on the sheet. I have done this
before so I'm not sure why it isn't working. I am creating a module in
the spreadsheet with the following:

Sub OpenInputForm()
frmTrendScoreCard.Show
End Sub

When I click on it it says it is missing an object... Then runs the
DeBugger and highlights the "frmTrendScoreCard.Show" section.

While I have done this before, I'm by no means what I would consider
adept. If I need to add more inforfmaiton

TYIA,

PZan


--
PokerZan
------------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...o&userid=23480
View this thread: http://www.excelforum.com/showthread...hreadid=477310


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Won't Open up Userform


I have double checked the name (even copied and pasted the name) and i
is still giving me the error #424 Object Required. I'm baffled..
:confused

--
PokerZa
-----------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...fo&userid=2348
View this thread: http://www.excelforum.com/showthread.php?threadid=47731

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Won't Open up Userform


I have double checked the name (even copied and pasted the name) and it
is still giving me the error #424 Object Required. I'm baffled...



--
PokerZan
------------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...o&userid=23480
View this thread: http://www.excelforum.com/showthread...hreadid=477310



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Won't Open up Userform


When I click on the definition as JNW suggested it pulls up the cod
behind my form... if that helps with anything

--
PokerZa
-----------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...fo&userid=2348
View this thread: http://www.excelforum.com/showthread.php?threadid=47731

  #7   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Macro Won't Open up Userform

Microsoft's website says the following: "This behavior can occur if the
references to the button are no longer valid because the menu context has
been switched to another document. "

I would make sure to also check the reference to the form. Do you have more
than one workbook open? Has the file name changed and affected the
reference? I really don't know what else to suggest other than double
checking the entries. In design mode, double-click the button to make sure
that it is referencing the right code.

Also, I couldn't tell from before, but make sure that the following code is
in a separate module and not the code for the sheet (you may have already
done this)
Sub OpenInputForm()
frmTrendScoreCard.Show
End Sub

I hope that helps. I've tried to recreate what you're saying and haven't
been able to at all. Never seen this before...

"PokerZan" wrote:


When I click on the definition as JNW suggested it pulls up the code
behind my form... if that helps with anything.


--
PokerZan
------------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...o&userid=23480
View this thread: http://www.excelforum.com/showthread...hreadid=477310


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you make a userform open automatically when you open excel? Evan Excel Worksheet Functions 1 March 11th 10 02:24 AM
Load caption box on userform open ExcelMonkey Excel Worksheet Functions 1 April 3rd 07 11:02 PM
Add a button to a sheet to open a userform PokerZan Excel Discussion (Misc queries) 1 June 17th 05 11:55 PM
How do I Open A UserForm in a Worksheet Pete Woodhead Excel Programming 4 October 31st 04 10:10 PM
Click on worksheet with UserForm open? Ed[_23_] Excel Programming 5 September 2nd 04 11:38 PM


All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"