worksheet

EXCEL 2007 - Need Help creating a button which takes the contents of active worksheet and pastes it in a new worksheet

这一生的挚爱 提交于 2019-12-13 00:33:31
问题 I have search throughout this site to find a answer to my problem and most of the related solutions are for a far more complicated problem. Here is what I need to have done. I created a simple form in Excel 2007. I am looking for the ability to add a button at the bottom of the form which allows the user to click on the button and copy that worksheet into a new worksheet within the same excel document. Basically just duplicating the active worksheet. I tried to do it with macros but did not

Variable between worksheet and module not cooperating

十年热恋 提交于 2019-12-12 17:19:53
问题 My Module1 macro doesn't see the value of variable stated in Worksheet code. Any idea why that is? Everything is public. In my Worksheet I have this: Public oldVal As Variant Public Sub Worksheet_SelectionChange(ByVal Target As Range) oldVal = Target.Value End Sub And in Module1 I have a macro connected to a button, that should (for testing purposes) just print the oldVal, but it isn't working. The message box is empty. Public Sub button_Click1() MsgBox oldVal End Sub Any idea why it isn't

SSIS Excel Import - Worksheet variable OR wildcard?

ⅰ亾dé卋堺 提交于 2019-12-12 14:43:13
问题 I have a SSIS data import package that uses a source Excel spreadsheet and then imports data into a SQL Server database table. I have been unsuccessful in automating this process because the Excel file's worksheet name is changed every day. So, I have had to manually change the worksheet name before running the import each day. As a caveat, there will never be any other worksheets. Can I make a variable for the worksheet name? Can I use a wildcard character rather than the worksheet name?

Is there is a way to insert macro to worksheet from Excel Addin?

别来无恙 提交于 2019-12-12 11:20:04
问题 I searched documentation Office Excel API, but cannot find any mentions at all, how it can be implemented. The Problem: Luck of API functionality or some sort of bugs can be solved easily by VBA macros. But, for doing that, we have only two possibilities: Insert macro manually into sheet, which will catch some event on sheet, and JS from addin will trigger that event (this solution came from very old forum (if I will find the link, I will insert it here)). Insert macro by JS code to sheet

VB.Net: Writing To Excel Workbook as Text

我只是一个虾纸丫 提交于 2019-12-12 06:22:40
问题 I have written the following function... Public Function writeAUTLSheet(doc As XDocument, myNameSpaces As Dictionary(Of String, XNamespace), theSheet As Excel.Worksheet) 'Grab the number of the last row to not overwrite Dim rowNumber As Integer = getLastRow(theSheet) For Each myName As XElement In doc.Descendants.Elements(myNameSpaces("ns4") + "autl") theSheet.Cells(rowNumber, 1) = doc.Descendants.Elements(myNameSpaces("ns") + "number").Value theSheet.Cells(rowNumber, 2) = myName.Descendants

Generate Excel Spreadsheet with Macros using Microsoft Access

本小妞迷上赌 提交于 2019-12-12 02:27:43
问题 While generating hundreds of Office Excel spreadsheets with Office Access is certainly possible, it would be great to add macros to the generated workbooks. I would like to add the functions to the object "ThisWorkbook" in the VBA project for each spreadsheet on generation. How would one go about doing this? Thank you in advance! 回答1: Under the assumption that the macro's in all generated workbooks are the same, create a template containing all VBA code (and optionally constant text like

How to fix activeX checkboxes moving when opening file

给你一囗甜甜゛ 提交于 2019-12-12 01:55:27
问题 I know this question have been ask before but I did not find a good answer for me. I can't do the windows updates because this form is used on multiple computers all across the country. I have 24 checkboxes that are hidden by default and them become visible depending on the combobox value. If I save the file with the checkboxes being hidden, once I open it all the checkboxes will be at one spot(not where they are suppose to be). If I save it with the checkboxes being visible then I open it

Unhiding very hidden sheet Excel VBA

假如想象 提交于 2019-12-12 01:40:00
问题 I am trying to create a user form that will unhide a specific worksheet based on the value of the combo box on the user form. There are 3 different worksheets that are " very hidden" in the workbook. The combo box is populated with 3 choices, one for each hidden sheet. I am using select case to make the correct sheet visible (Eventually there will be many more than 3 sheets/options. Sample code follows (located in the user form code window): Private Sub NextButton_Click() Select Case ComboBox

If Cell.Value is specific size, Copy 3 cells in that row to new sheet

萝らか妹 提交于 2019-12-12 01:39:54
问题 I have an excel document that I fill out with tshirt sizes, names, and numbers. The goal here is... once the form is filled out, I can hit a button that will copy all the smalls and put them onto a new sheet, all the mediums, onto another, and so on. I CAN select the whole row, but I ONLY WANT to copy a few cells. I am also pasting them at this point into the same row on the new sheet as they were in the old sheet. I just want them to show up on the next available line. Here are some examples

Getting the value of a listbox to dynamically change with worksheets

孤者浪人 提交于 2019-12-12 01:36:50
问题 How can I get the value of a listbox in a userform to dynamically change when the user changes the value of a another list box in the same userform. The main portion that is giving me trouble is lstMonth. The value of lstMonth should equal the months, which correlate to the data in different sheets that will show in the first listbox. I will provide a picture of the form and data so that this all makes more since. Code Option Explicit Private Sub cmdCalc_Click() 'declare variables and assign