Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Excel button errors

03 Mar 2018   #1
ah100

 
 
Excel button errors

I have several macros in my Excel 2003 that work fine when run manually (either F5 or F8), but when run from a forms button, do something different, such as jump to the wrong cell. I usually don't have a problem with using a button.


My System SpecsSystem Spec
.
03 Mar 2018   #2
Ranger4

Windows 7 Home Premium 64 bit sp1
 
 

You need to check that macro formula is correct for the button application & matches the key formula exactly.
My System SpecsSystem Spec
03 Mar 2018   #3
Paul Black

7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
 
 

Does the Macro have Active Cell (where the cursor needs to be in order for the Macro to run correctly) at the top of the Macro or is the cell hard coded?
My System SpecsSystem Spec
.

03 Mar 2018   #4
ah100

 
 

Thanks for the quick reply. Not sure what you mean by "You need to check that macro formula is correct for the button application & matches the key formula exactly.". I wrote a macro and assigned it to a button and it worked ok, but now doesn't. Note that it works manually just fine. Also note that the cursor has to be in the correct cell for it to start, but I'm sure it is, as that is the most convenient way for this macro to be used. As for the ActiveCell comment, here is the first line:
ActiveCell.Offset(-1, 1).Range("A1").Select Why did it work before and not now? I must have changed something.
My System SpecsSystem Spec
03 Mar 2018   #5
Paul Black

7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
 
 

Hi ah100,

Basically, what that line of code does is, wherever the cursor is in the SpreadSheet it goes 1 cell up and 1 cell to the right.
Why don't you just hard code the actual cell you want to start the Macro in.
I assume that your Macro has been recorded?

I hope this helps!
My System SpecsSystem Spec
03 Mar 2018   #6
ah100

 
 

I use the offset command because I don't start in a particular cell, but offset (-1,1) locates the right cell. I have done some adding and removing of whole rows and wonder if maybe there is some confusion in the macro on what to do. Will investigate. Funny that it works manually, but not with the button.
My System SpecsSystem Spec
Reply

 Excel button errors




Thread Tools




Similar help and support threads
Thread Forum
Excel missing Logo on Icon Button
Had an automtic update occur last night for Win 7 PC and this morning the Excel Logo on the Excel Button is missing. I use to be able to associate the program with the Logo in XP, but do not know how this is done in Win 7. Any suggestions.
Microsoft Office
Excel: How can I insert the value of cell into ActiveX button caption?
Hi, I'm using Office 2007 and I have an Excel file that I have to update often. Therefore I will automate certain tasks using macros accessible by ActiveX Control command buttons. However, I would like for the captions to be relative to information found in certain cells; examples of a caption I...
Microsoft Office
Excel 2010 WebDav Connection to SharePoint Errors
I am in the process of assisting some users in switching from Win XP/Office 2003 -> Win 7/Office 2010 and have hit a roadblock. I have a user that has an excel macro that opens an ADO connection to a SharePoint and grabs a record of the excel files on the SharePoint. The macro works perfectly on...
Microsoft Office
Excel 2003 Errors w/Win7 Ultimate 64bit? Is there a fix?
I was hoping this was just me making Excel formulae mistakes, but it isn't. I run office pro 2003 on my daily driver Win7 Ultimate 64bit, and Excel is not coherent. It works, but makes mathematical mistakes :huh:.... lots of them and so far I have not found a pattern. anyone familiar with...
Microsoft Office
Can't open 2003 Excel Files in Excel 2007?
I'm not sure if it because the files are 2003 or not? When I try to open them an error message appears stating, "...the file you are trying to open is in a different format than specified by the file extension. Verify file is not corrupted and is from a trusted source..." These are my files. The...
Microsoft Office


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 21:13.
Twitter Facebook Google+