vba

ravi vishwakarma

New Member
Joined
Jun 3, 2015
Messages
1
hey there is any way
if iam using vba command in one workbook
it can apply to all workbook
like iam using the command
target.value = "change"
and apply it on my workbook say (1st workbook)
and i want that it will apply to all workbook

  • :confused:

help me expertsssssssssss.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
VBA is a pretty non-descript question topic, and I suspect there is some loss of context in the translation...

I can't tell if you are asking literally if it is possible to create an Excel application event procedure that would run on every workbook, or if you are using the term "workbook" when you mean worksheet?

In either case, the answer is Yes. You can create workbook level events by putting appropriate code in the VBE "ThisWorkbook" object. You would be coding the SheetChange event, and whatever your code (target.value = "change") might be... it would apply to each worksheet in the workbook.

Application level events are a bit more complicated, but you can certainly create them. In this case you would be programming an "add-in" for Excel. Which means you would be saving the code as a ".xlam" file and setting the "IsAddin" property to true. Which essentially hides all of the associated (although still usable) worksheets. In your add-in, you would be coding in Class modules to create your application level events; and these events would apply to any workbook you open. This typically requires a little more experience and familiarity with VBA and frequently requires more lengthy explanations that may be too exhaustive for people to want to contribute. In this case I would say you might want to search the net related to "Excel Application Level Events", "How to create Add-ins for Excel" and possibly "Excel VBA Class Modules" to read-up a bit and then maybe ask more specific questions.
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

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