I've sought for a solution everywhere:
I've made a user program (in EXCEL) where the user shouldn't be able to change anything concerning the formatting (colour, width, fonts, comments ... etc. etc.): the user is only capable to see the tables in the (visible) sheets on the screen and the tabs "chooser".
The user can actively only edit in the cells. I use extensively sheet protection, shortcuts, scrollarea and my userdefined contextmenu to achieve what I want. With my +400kB VBAcode.
It works perfect in Excel 2007 (and I think for Excel 2010)!
For the ribbon to not appear I use:
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False)"
But not in Excel 2013! I use massively the [ALT]-key for my shortcuts, but when pressing it, the ribbons formatting options appear.
I've seen examples using:
CommandBars.ExecuteMso "HideRibbon"
But it is not a solution as it is always possible for the user get to the Autohide ribbon/Show Tabs/Show Tabs and Commands in the right upper corner.
Is there a way to get "rid" of the ribbon in Excel 2013 and by no means (except VBA) to get it back. Specially the [ALT]-stroke form the user shouldn't be able to call it.
EDIT
I've added an image showing a section of what it looks like having NO Quick Access Bar or Ribbon in my EXCEL 2007. There is only the MS titleline, a plein table and some tabs (sheets) to chose.
So I have programmed several userform with several user inputs(text boxes, check boxes, etc.) Now how can I use them outside of excel?
Currently I have to:
Open up the spreadsheet
Enable macros
Go to Developer Tab, View Code
Then find the right userform and run it or type F5.
Is there a more user-friendly way to run the userform? Its for testers who don't know vba or excel programming.
Thanks!
Yes, absolutely. You could create a button named after the form in question, and to that button assign the following macro:
Sub btn1()
frm1.Show
End sub
That's it! Of course, change the names according to what you have :)
I also reccomend having a button to close the form on the form itself.
OF COURSE this still uses Excel. If you want to use them on their own you could have something like this guy did: How to Open only UserForm of an excel macro from batch file
I have developed a VBA userform interface that allows the user to input values, have it calculate results, and then print them out into the worksheet. I am wondering if there is any possible way that I can have a button on the excel ribbon, say under the "Data" tab for instance, that would elicit the userform interface to open.
Currently the only way I can use the interface is by Developer>>Visual Basic>>Clicking on Userform>>F5. This also limits the userform in that it can only be used in one particular workbook as opposed to many. Or if it was somehow possible, to make it an add-in instead.
Any help is greatly appreciated!
The easiest way to add custom tab and/or button to Ribbon is to use Custom UI Editor Tool for MS Office Ribbon. Follow the links provided in comments to your question too. There you'll find many useful information.
Does anyone know of a pre-packaged solution for referencing Excel cells directly in a Word document?
For example,
{[TestExcel]Tab1!A1}
Dear Mr. {[TestExcel]Tab1!A2},
Our systems have alerted us that your account {TestExcel]Tab1!AccountNumber} is overdue. Please remit payment of {TestExcel]Tab1!PaymentDue} immediately.
This example uses a hypothetical { } syntax, where the contents are standard Excel formula.
Every solution I've seen uses custom VBA to accomplish this. It seems like an extremely common need for which there should be some good 3rd party software available that lets non-technical users accomplish this task.
As indicated in the example above both named ranges and standard cell references would need to be supported.
Yes.
Step 1: Copy the excel cell.
Step 2: Go to your word document where you want to paste the reference.
Step 3: Right click
Step 4: Under paste options, select "link with source formatting" or "link and merge formatting".
I tried #Green Demon's method, but the two Paste Options listed were not present for me (Office 2013). I only had Keep Source Formatting, Merge Formatting, and Keep Text Only. However, I poked around and found the Paste Special, which was hidden on the Ribbon
The instructions are as follows:
Copy the Excel range.
Go to your Word document, and left click where you want to paste the Excel range.
Click on Paste Special from the Ribbon as shown below, or type Ctrl+Alt+V.
Click on the Paste link radio button.
Click on Microsoft Excel Worksheet Object. The Paste Special dialog box should look something like this:
Click OK.
The range should now be pasted in your document, and if you save, close, and re-open the Word document, you will be prompted about whether or not you want to "update this document with the data from the linked files," which works the same way as it does if you're doing Excel-to-Excel linking.
This feature is fantastic, and I'm so happy to have found it today. However, in my brief experience using it, having these Word-to-Excel links dramatically increases the amount of time it takes to open your Word document, even before it prompts you about updating. After that, the act of updating the Excel links takes much longer than it would if you were doing the same linking Excel-to-Excel. All of my work is done on network-share files, so YMMV.
While Will's solution indeed links from the Cell objet, the content is inserted as a picture.
In the same dialog, selecting "Unformatted Unicode Text" instead will link and insert only the cell's content, which is desirable if you apply custom formatting on your text.
Unfortunately, this action only works for a single cell. Copying multiple cells will result in a text block with individual cell content seperated by tabs or line skip, with the entire block considered linked and entire. The solution is to link individual cells using this method.
This can become tedious if you plan on linking large portions of table from Excel, as for every cell the dialog must be invoked. It can be sped up by using hotkeys, but the sequence gets tedious:
alt,h,v,s, then alt+l, tab, ↓, and finally Enter
Obviously this is not practial for large numbers of cells. A AutoHotkey script can help but it third party grafted solution, on par with using VBA scripts.
alt+h+v+l works too. If you're building big documents clicking the ribbon every time gets murderous after a while.
As this is still a problem but the other answers do not take into account the latest development in word, there is a new solution, editing Green Demons answer:
Step 1: Copy the excel cell.
Step 2: Go to your word document where you want to paste the reference.
Step 3: go to the "home" tab
Step 4: Under paste options, go to "Paste Special", click on "paste link", click on "Unformatted Text".
This solves the issue others were having with the new lines that you would otherwise have with just Green Demons' solution.
Hope this still helps others.
Could someone please explain to me the difference between the combo box that's available via the Developer Ribbon in Excel 2007 vs. the Combo Box control that's in the VBA editor? I cannot get this simple line of code to work using the Developer combo box:
MsgBox Combo1.Value
I've tied it to the change event and it seems to be syntactically correct (I'm not a VBA coder by any stretch).
Is the Developer Ribbon version some bastardized craptastic Microsoft shortcut?
What I'm trying to do is populate a second combo box based on the selection of the first combo box. I'd rather not build a case statement for every possible selection. Is this possible using the Developer ribbon version?
You are talking about the Insert button on the Developer tab correct? From that button you can add an ActiveX control or Form control. You're better off using the form controls if your new to programming as they will behave more in line with any Excel VBA reading you've done and the help file. With the Form controls you can right click and choose 'View Code' and/or 'Rename Control and Code'. Renaming the control allows you to address it in VBA however you like. e.g. - Combo1.value or myFavoriteCombo.value
That being said, to answer your question directly, be sure you know the controls full name. If you used a form control and it was the first one you put on the sheet it will be named ComboBox1. To get to the combobox's properties you have to walk through it's 'parent' sheet.
i.e.
MsgBox Sheet1.ComboBox1.value (using the sheet's code name)
or
MsgBox Worksheets("SheetName").ComboBox1.value (using the sheets name as it appears on the Excel tab)