vba

AddItem not populating options in combo box

▼魔方 西西 提交于 2021-02-04 21:42:04
问题 I have the following form. I've added each item as per .AddItem "" , however they are not populating in the combobox in the userform. (This is in a separate module referring to the userform) Code With frmForm .txtFirst.Value = "" .txtLast.Value = "" .txtYear.Value = "" .cmbSchool.Clear .cmbSchool.AddItem "Harvard" .cmbSchool.AddItem "Northwestern" .cmbSchool.AddItem "UCBerkley" .cmbSchool.AddItem "Stanford" .cmbSchool.AddItem "NYU" .cmbSchool.AddItem "UoT" .cmbSchool.AddItem "UBC" .cmbSchool

CSS selector QuerySelector alternative

醉酒当歌 提交于 2021-02-04 21:41:04
问题 I have searched a lot and a lot so as to find material about how to get meta data using XMLHTTP. And I think that's impossible to do that using the Early binding method. The only approach that will work is the late binding by CreateObject("HTMLFile") and dealing with that HTML which is late binding. The disadvantage of this approach is that it doesn't support the use of the QuerySelector or QuerySelectorAll .. Now I am trying to find alternative to this CSS selector .. without using the

How can I run these macros together across every worksheet in the workbook?

做~自己de王妃 提交于 2021-02-04 21:37:23
问题 I have made an excel book, where a data set is pasted into one tab, and macros are run to filter out the information into seperate worksheets, ready to batch PDF. Currently I have a button on each sheet to 'Update Table' and have to go through each sheet to click this button. I want this as one button on the first sheet. I also have a button to set the print area on all sheets - this one loops and works fine. I'd like to merge the codes, so one button will go through each sheet to update the

AddItem not populating options in combo box

孤街浪徒 提交于 2021-02-04 21:37:21
问题 I have the following form. I've added each item as per .AddItem "" , however they are not populating in the combobox in the userform. (This is in a separate module referring to the userform) Code With frmForm .txtFirst.Value = "" .txtLast.Value = "" .txtYear.Value = "" .cmbSchool.Clear .cmbSchool.AddItem "Harvard" .cmbSchool.AddItem "Northwestern" .cmbSchool.AddItem "UCBerkley" .cmbSchool.AddItem "Stanford" .cmbSchool.AddItem "NYU" .cmbSchool.AddItem "UoT" .cmbSchool.AddItem "UBC" .cmbSchool

IF FIND function doesn't find anything in vba then

别说谁变了你拦得住时间么 提交于 2021-02-04 21:22:56
问题 I'm currently automating a manual process that does the following steps: 1.Prompts the user to open a data file and opens the file 2.Inserts 4 columns 3.Using the data that was already in the file creates a unique string in the format "DD/MM/YYYY TEXT" where text is a variable 4.Uses an if statement to determine if a row exists within the Master Data File 5.If the value in column d = "Exists" then find the string in the Master data file and use the vlookup function to transfer the data from

IF FIND function doesn't find anything in vba then

无人久伴 提交于 2021-02-04 21:20:09
问题 I'm currently automating a manual process that does the following steps: 1.Prompts the user to open a data file and opens the file 2.Inserts 4 columns 3.Using the data that was already in the file creates a unique string in the format "DD/MM/YYYY TEXT" where text is a variable 4.Uses an if statement to determine if a row exists within the Master Data File 5.If the value in column d = "Exists" then find the string in the Master data file and use the vlookup function to transfer the data from

Interop with Microsoft Access does not interact with User's session

ε祈祈猫儿з 提交于 2021-02-04 21:16:18
问题 I am injecting a piece of VBA code into a Microsoft Access database from .Net. It is just a single line of code, which runs a Macro. All the Macro does is run a block of VBA code inside a module. The issue I am having is that this all happens in a new MSAccess session, which I can't even see, instead of the session the user currently has open. Is it possible to, instead, have this interact with the users current MSAccess session? The whole point of this is to open a particular form inside the

Why does For Each over Range.Columns(1) not iterate over cells?

北战南征 提交于 2021-02-04 21:12:17
问题 I can iterate over a range of cells to operate on each cell individually, if the range is specified by address: Dim cell as Range For Each cell In Range("A1:A10") debug.print cell.Address Next cell Produces the expected output: $A$1 $A$2 ... etc But when I specify a column from the Columns collection of a range, iteration only runs once with the whole column: For Each cell In UsedRange.Columns(1) Debug.Print cell.Address Next cell Produces just one output, with the whole column: $A$1:$A$20 Is

Why does For Each over Range.Columns(1) not iterate over cells?

余生颓废 提交于 2021-02-04 21:12:08
问题 I can iterate over a range of cells to operate on each cell individually, if the range is specified by address: Dim cell as Range For Each cell In Range("A1:A10") debug.print cell.Address Next cell Produces the expected output: $A$1 $A$2 ... etc But when I specify a column from the Columns collection of a range, iteration only runs once with the whole column: For Each cell In UsedRange.Columns(1) Debug.Print cell.Address Next cell Produces just one output, with the whole column: $A$1:$A$20 Is

Batch/Macro code to get latest file from FTP site

久未见 提交于 2021-02-04 19:58:38
问题 We have a shared FTP site with a daily file upload which I need to download and run checks over. I'm simply trying to automate the process. The FTP file is something like name_20150901.xml . So far I have a batch file to get the file but I can't figure out how to get the latest. Here is my code: @ftp -i -s:"%~f0"&GOTO:EOF open ftp.site.com <user> <pass> lcd my local direc binary get todaysfile_20150901.xml What changes do I need to read the files and get the newest one? My end goal is to have