Forum

How to copy over a ...
 
Notifications
Clear all

How to copy over a VBAProject to another report?

3 Posts
3 Users
0 Reactions
67 Views
(@rellsunn)
Posts: 1
New Member
Topic starter
 

Hi!

I had another expert create code on a sample report. All works perfectly. However, i need that code to be used on my final report. How do I copy it over?

I've include both sample (SEARCH BOX TEST) and final report (SEARCH BOX VBA)

Basically his code works on tab 2. Once you add an account name in E4 the cell highlights and you are brought to it directly.

 

I've tried everything all day. I even created a References folder (how I do not know) under my PERSONAL.XLSB which I cannot remove for the life of me.

 

Here's hoping someone can help!

Thx

 
Posted : 07/11/2017 6:07 pm
(@david_ng)
Posts: 310
Reputable Member
 

Can try to export the VBA script to a bas file  then import the bas to the designated Excel file required the VBA

 
Posted : 08/11/2017 9:37 pm
(@jonpeltier)
Posts: 9
Active Member
 

Can you find the expert's code in the workbook they provided? Use the project explorer pane (usually top left of the VB Editor) to look for it.

If so, open the module of your project corresponding to the module in their project.

In other words, if it's code on the Sheet2 module, open your Sheet2 module. (Sheet and Workbook modules are in the Excel Objects folder in the project explorer).

If their code is in a regular module (from the Modules folder), and you don't have any regular modules, go to Insert menu > Module, and use this to hold the code.

Then simply copy their code and paste it into your module.

 
Posted : 18/11/2017 10:10 am
Share: