appactivate is not working

bruno1970

New Member
Joined
Nov 11, 2015
Messages
2
hi,
thanks for letting me join this community.
i am very curious about vba, but my knowlwdge is very little.
1. i´d like someone to explain me why instruction APPACTIVATE doesn't work on my excel2013.
2. is this or is this not an excel2013 instruction?
3. my goal is to activate excel no matter the application i´m working. so, i try to activate excel through appactivate, but it doesn't work.

when i run this code

Sub appactivate()
Dim ms As String
ms = Application.Caption

MsgBox (ms)
appactivate ms' i´ve tried also appactivate "Microsoft excel" and it doesn´t work neither
End Sub

excel returns: compile error. wrong number of arguments or invalid property assignement.
the problem is appactivate because if i take it out, msgbox works.

CAN YOU PLEASE HELP ME??
thank you.

bruno (Portugal)
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Welcome to the Board!

What are you trying to do?

All Application Caption is going to do is give you the active Application Caption (E.G. "Book1 - Excel").
 
Upvote 0
hi smitty,
thanks for your time.
answering to your question, i´m trying to activate the application excel, so i read i could use APPACTIVATE.

Imagine i´m working on an excel file and, time-to-time, excel asks me throught INPUTBOX "what type of music are you listening?" (if you want, i send you the code).
however, if i´m not working on an excel file, the message (INPUTBOX "what type of music are you listening?") is not shown because excel is not active at that moment nor activates excel because APPACTIVATE is not recognized by excel2010/2013.

i´ve also tried this code (and others i copied from Microsoft):


appactivate "Microsoft excel"

and it doesn't run (nor VBA changes it to AppActivate), warns for an error and i don't understand why.

please, what´s the problem?? how can i do what i want??

thank you for your help.

Bruno
 
Upvote 0

Forum statistics

Threads
1,216,083
Messages
6,128,718
Members
449,465
Latest member
TAKLAM

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