Inputbox-Avbrytnapp

macc

New Member
Joined
Mar 20, 2009
Messages
5
Min application börjar fungera tack vare ert hjälp!
Men... det är alltid något..
Inputbox som används har två knappar. Trycker man OK som man ska fungerar allt men om man trycker den andra AVBRYTknapper duker upp meddelandet "Körfel 91" !? och applikatinen stannar ..

Frågan är hur man kan få knappen AVBRYT (Cancel) att fungera?

Stor tack på förhand!

macc
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Intressant, kör jag
Code:
Application.InputBox("Välj ett Nr")
så går det hur bra som helst att klicka på cancel.

Det kan hända att du måste lägga upp lite mera info kring problemet.

Har du definierat variabeln "strCell" till något? Dvs initialiserat den med en "Set"
 
Upvote 0
När jag vill avbryta har jag programmerat som nedan för t.ex. avbrytknappen som är nr 2:

Private Sub CommandButton2_Click()
Unload Me
End Sub

Hälsningar
Thomas
 
Upvote 0
Re: Inputbox-Avbrytknapp

Felet är kanske någon ananstans...

Min kunskapsnivå är för låg ...

Har du lust att titta i hela applikationen?

macc[/quote]
 
Upvote 0
Re: Inputbox-Avbrytknapp

Hej Thomas
och tack för svaret.

Ditt förslag fungera på en programmerad knapp men löser inte problemet med avbrytsknappen på inputbox.
Hälsningar, Macc
 
Upvote 0
Du kunde ju lägga upp koden så kan man försöka titta lite på den.

Det verkar rätt märkligt eftersom Cancel-knappen inte borde ha ngn funktion bunden till sig annat än att stänga Input-fösntret.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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