excel

=INDEX(PeriodList,MonthNo) creating _xlfn.SINGLE name in workbook

白昼怎懂夜的黑 提交于 2021-02-18 19:28:13
问题 I hope someone will be able to help with a problem that has surfaced with a recent Excel update. If I define two range names in an Excel worksheet and then enter =Index(PeriodList,MonthNo) in cell A13 via the UI, I find that Thisworkbook.Names.Count in VBA reports 2 - as expected. However, if I execute Activesheet.Range("A13").Formula = "=Index(PeriodList,MonthNo)" in VBA, Thisworkbook.Names.Count reports 3 and I find that a new name that cannot be deleted is created. The name is _xlfn.SINGLE

Excel VBA using Selenium

时间秒杀一切 提交于 2021-02-18 19:13:45
问题 I am om Windows 10. I am trying to use Selenium to automate the Edge browser (or any other browser) via Excel VBA. I went to https://www.selenium.dev/downloads/ There I downloaded Selenium Server, Latest stable version 3.141.59 and Python 3.141.0 November 01, 2018 4.0.0a6.post1 May 28, 2020 Download (I am not using Python but I thought I might in the future.) Then I opened Excel VBA and opened Tools but could not find the “Selenium Type Library” option in the drop down. I did more reading and

Same macro for multiple textboxes on the same userform excel vba

笑着哭i 提交于 2021-02-18 19:10:13
问题 I am currently making an userform in which I got multiple textboxes. So for now I got a total of 15 textboxes and each of them should only contain numerical values. The code I got now for each TextBox is: Private Sub TextBox1_Change() If TypeName(Me.ActiveControl) = "TextBox" Then With Me.ActiveControl If Not IsNumeric(.Value) And .Value <> vbNullString Then MsgBox "Sorry, only numbers allowed" .Value = vbNullString End If End With End If End Sub Private Sub TextBox2_Change() If TypeName(Me

Same macro for multiple textboxes on the same userform excel vba

我的梦境 提交于 2021-02-18 19:09:44
问题 I am currently making an userform in which I got multiple textboxes. So for now I got a total of 15 textboxes and each of them should only contain numerical values. The code I got now for each TextBox is: Private Sub TextBox1_Change() If TypeName(Me.ActiveControl) = "TextBox" Then With Me.ActiveControl If Not IsNumeric(.Value) And .Value <> vbNullString Then MsgBox "Sorry, only numbers allowed" .Value = vbNullString End If End With End If End Sub Private Sub TextBox2_Change() If TypeName(Me

Same macro for multiple textboxes on the same userform excel vba

拈花ヽ惹草 提交于 2021-02-18 19:09:16
问题 I am currently making an userform in which I got multiple textboxes. So for now I got a total of 15 textboxes and each of them should only contain numerical values. The code I got now for each TextBox is: Private Sub TextBox1_Change() If TypeName(Me.ActiveControl) = "TextBox" Then With Me.ActiveControl If Not IsNumeric(.Value) And .Value <> vbNullString Then MsgBox "Sorry, only numbers allowed" .Value = vbNullString End If End With End If End Sub Private Sub TextBox2_Change() If TypeName(Me

Same macro for multiple textboxes on the same userform excel vba

本小妞迷上赌 提交于 2021-02-18 19:08:32
问题 I am currently making an userform in which I got multiple textboxes. So for now I got a total of 15 textboxes and each of them should only contain numerical values. The code I got now for each TextBox is: Private Sub TextBox1_Change() If TypeName(Me.ActiveControl) = "TextBox" Then With Me.ActiveControl If Not IsNumeric(.Value) And .Value <> vbNullString Then MsgBox "Sorry, only numbers allowed" .Value = vbNullString End If End With End If End Sub Private Sub TextBox2_Change() If TypeName(Me

Same macro for multiple textboxes on the same userform excel vba

耗尽温柔 提交于 2021-02-18 19:08:28
问题 I am currently making an userform in which I got multiple textboxes. So for now I got a total of 15 textboxes and each of them should only contain numerical values. The code I got now for each TextBox is: Private Sub TextBox1_Change() If TypeName(Me.ActiveControl) = "TextBox" Then With Me.ActiveControl If Not IsNumeric(.Value) And .Value <> vbNullString Then MsgBox "Sorry, only numbers allowed" .Value = vbNullString End If End With End If End Sub Private Sub TextBox2_Change() If TypeName(Me

How can I iterate over worksheets in win32com?

天涯浪子 提交于 2021-02-18 18:58:28
问题 I generate an xlsx file with lots of sheets and I want to take me at specific position when I open it manually with Excel. This function does the job but for one sheet only. How can I apply it to all of the sheets in workbook? import win32com.client def select_cell(): xl = win32com.client.gencache.EnsureDispatch('Excel.Application') wb = xl.Workbooks.Open(r'H:\Files\1.xlsx') ws = xl.ActiveSheet ws.Range('B100').Select() wb.Close(True) xl.Quit() select_cell() I want to make something like this

How can I iterate over worksheets in win32com?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-18 18:56:21
问题 I generate an xlsx file with lots of sheets and I want to take me at specific position when I open it manually with Excel. This function does the job but for one sheet only. How can I apply it to all of the sheets in workbook? import win32com.client def select_cell(): xl = win32com.client.gencache.EnsureDispatch('Excel.Application') wb = xl.Workbooks.Open(r'H:\Files\1.xlsx') ws = xl.ActiveSheet ws.Range('B100').Select() wb.Close(True) xl.Quit() select_cell() I want to make something like this

Transposing rows into columns, but I am just picking the elements that I need to transpose from a set of data

微笑、不失礼 提交于 2021-02-18 18:51:59
问题 I am trying to manipulate a set of data by moving certain data sets from sheet1 to sheet2 . I have a header consisting of 16 elements on sheets2 , they are same headers all the time. I collect data and write them in sheet1 . They are organized in two columns: Column A: consists of the headers(Horizontal, in rows- 57 elements), Column B: consists of the values for these headers. Now, I need to pick a header from sheet2 and match it to a header in sheet1 , if a match is found, then copy the