Solved

Excel VB question

Posted on 2014-10-13
3
124 Views
Last Modified: 2014-10-14
Folks I need some help here.  I have created a script that is intended to sort data, put data column headers in and add the auto filter.  I have to install this on managers machines so my intent is to have each manager save the VB script as an add in file.  That way each time they open up the source data to be manipulated all they would need to do is hit the control key, cntrl+J, to run the macro.

Here are the issues I am running into:
1.  I am gettin a 400 error when I run the script on another machine,  I don't get this error when I run it on my machine.
2. The shortcut key doesn't work even after going into the macro options and making sure that the short cut key is set there.

I have included my data source file and my script code.  Can someone please help me figure this out.
PAR-Test1.xlsm
DlyReleaseActivity-20140903.csv
0
Comment
Question by:Rrave26
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
ProfessorJimJam earned 500 total points
ID: 40377965
Hi,

you had put your recorded code into sheet object module which is wrong.
now try it with the file i have attached.  Control K is the shortkey to run the macro.
PAR-Test1.xlsm
0
 

Author Comment

by:Rrave26
ID: 40380112
Thanks for your help, I am trying this out right now.  Can I ask why it was wrong to record the code into the sheet module?
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40380160
sheet vba object page is used for other purposes , like codes triggered by events called event handlers.

module is for the normal functions and procedures to place
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question