excel

VBA Run Macro and Screen Tip (or Tool Tip) From Shape. I cannot get the code I found to work

不问归期 提交于 2021-02-11 13:38:41
问题 I am using custom buttons (shapes) as buttons and I would like to use this code that I found but I cant get it to work correctly and I dont know why. The goal is to add a screentip to the shape as well as a macro. Normally this doesnt work. Only one or the other will work but not both. --- Please do not ask me to insert Activex Controls. I am aware Mouse move events. I did try that way and it works but it is very glitchy.--- The attached method would be perfect if anyone can help me

How to print values into next empty row cells?

笑着哭i 提交于 2021-02-11 13:37:57
问题 I have designed a VBA form to collect data from the user. However, I want to allow the user to fill the form multiple times and each time prints the filled out data into appropriate cells in the Excel sheet, so I want the VBA program to look for the next empty cell in the sheet without having the user to look manually and select it. Cells(lastRow, 1) = emplName Cells(lastRow, 2) = depTxt Cells(lastRow, 3) = emplNo Cells(lastRow, 4) = mngrName Cells(lastRow, 5) = ComboBox1.Value Here for

Systematically annotate a PDF

北城以北 提交于 2021-02-11 13:37:33
问题 I have a large PDF file with several hundred pages. Each page of the PDF contains a chart and also includes a unique identifier (the chart number). I have individual comments for each chart and would like to insert these in the corresponding PDF page, e.g. chart comment 34 goes in PDF page containing chart 34. My current approach is to insert these comments manually, one by one, using the comment tool in Adobe Acrobat Pro. This takes time as you can imagine. Is there a way to speed up this

Using Openpyxl to create multiple custom spreadsheets

时光毁灭记忆、已成空白 提交于 2021-02-11 13:36:39
问题 I'm trying to create a series of spreadsheets for my office based on criteria from a larger spreadsheet we have. This could very easily be done by hand, but since I am new to programming, I thought this could be a fun exercise to see if I could do it with python using the Openpyxl module. Basic problem: I have a list of countries people are traveling to, and I have rows with people's names and other data, including the name of the country each person is traveling to. The country each person

Continue procedure if CommandButton is clicked

与世无争的帅哥 提交于 2021-02-11 13:32:58
问题 So far I have used the below VBA in order to continue with a procedure if the user clicked ok in the MsgBox : Sub Button_Message_Box() Answer = MsgBox("Do you want to continue the procedure?", vbOK) If Answer = vbOK Then Sheet1.Range("A1").Value = 1 Else End If End Sub Now I want to achieve the exact same result using CommandButton1 in UserForm1 . Therefore I tried to go with this: (1) VBA in UserForm1 : Private Sub CommandButton1_Click() Unload Me End Sub (2) VBA in Modul1 : Sub Button

VBA Filter Partial String Containing Date

僤鯓⒐⒋嵵緔 提交于 2021-02-11 13:32:47
问题 I need to filter Col A based on a PARTIAL STRING. The user needs to be able to filter for YEAR only ... or YEAR & MONTH ... or YEAR & MONTH & DAY YEAR ONLY : 20 YEAR & MONTH : 2002 YEAR & MONTH & DAY : 200206 The following will filter the year or the year & month .... it fails to filter for year / month / day. Thank you for looking. Sub FiltDate() Dim strName As String Dim range_to_filter As Range On Error Resume Next Set range_to_filter = Range("A2:A500000") 'Sheet4. Dim ret As String Dim

Fast way to query listobject vba

坚强是说给别人听的谎言 提交于 2021-02-11 13:32:09
问题 I use excel 2016 and need to get a value from list object. There are several columns. For example three, and I need to get the value in column1 where column2=smth, column3=smth. How can I do this fast? 回答1: If you want SQL syntax and speed in VBA then you need to use the ADO DB connector. In my experience it was 4x faster than using native Excel functions to find the data. It's a lengthy topic that requires you read multiple articles. Much more information than should fit in to one SO post.

When using ods excel statement stop Excel converting numbers saved as character

▼魔方 西西 提交于 2021-02-11 13:31:55
问题 I need to export some results from SAS to Excel. So far, I was using a simple proc export for that but since the export got more complex (multiple proc result s and data sets need to be mapped to one sheet) I need to find an alternative. It seems, ods excel is the way to go - and I agree, it is highly customizable - but I am facing a problem where I am not sure whether it is SAS or Excel related. Problem: When I have a SAS data set with character columns, where the data are strings of digits

When using ods excel statement stop Excel converting numbers saved as character

送分小仙女□ 提交于 2021-02-11 13:31:39
问题 I need to export some results from SAS to Excel. So far, I was using a simple proc export for that but since the export got more complex (multiple proc result s and data sets need to be mapped to one sheet) I need to find an alternative. It seems, ods excel is the way to go - and I agree, it is highly customizable - but I am facing a problem where I am not sure whether it is SAS or Excel related. Problem: When I have a SAS data set with character columns, where the data are strings of digits

Formatting numbers with prohibited characters

一曲冷凌霜 提交于 2021-02-11 13:27:34
问题 Formatting a value to display units adds clarity while retaining the numerical value in the cell. This can be done using: =TEXT(1000,"#,### kW") or via the formatting dialog: Format Cells > Number > Category Custom But some characters are not allowed by either method. How can this be done for units like "kWh" or "kWh/yr" without converting the value to a text type and thereby preventing the value from being used in a calculation? 回答1: Either enclose your string within quotes, or "escape" each