Wikipedia:Reference desk/Archives/Computing/2020 April 22

Computing desk
< April 21 << Mar | April | May >> April 23 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


April 22

edit

Frame by frame with the E key

edit

I'm looking for a media player software that I can watch the video frame by frame with the E key. I already familiar with VLC and Jaksta. Do you happen to know more media player software like that? 109.186.71.39 (talk) 12:25, 22 April 2020 (UTC)[reply]

If the media player of your choice can show frame by frame with a hotkey or a button you can write a simple AutoHotkey script that ties "E" to that hotkey or button if you wish. 89.172.105.179 (talk) 01:30, 24 April 2020 (UTC)[reply]
mpv (media player) supports this. It's not mapped to "E" by default, but I think it might support remapping keys in the configuration, and in any case you can do this trivially for any software, as the previous respondent stated. (How to do this varies by platform; AutoHotkey, as mentioned, is great for Windows. Also since mpv and VLC are free/open-source you could go in and modify the source code and compile your own version though this would be ridiculous for such a trivial thing.) --47.146.63.87 (talk) 02:18, 26 April 2020 (UTC)[reply]

Excel VBA help

edit

I'm sure this is dead simple, but my VBA "skills" are so bad I can't adapt the various codes I've seen on line to fit my particular case. So, I'm fixing up an Excel file with weekly pricing information in it. Each week we get new pricing to add to it, forming a kind of historical record so that our customer can see their current price and the trends. The weeks ascend left to right with the rightmost column showing "current": Jan 1, Jan 8, Jan 15, CURRENT. Populating the values is no problem - it's done via VLOOKUP. Current workflow is to insert a column to the left of the final one and copy-pasting the values. Then we refresh the data so the current is current and last week's values are static. Not rocket science.
What I'd like to do is provide them with a button that does those steps automatically. There are many, many results on line for how to find/copy the last column, but I can't seem to get it to insert a column to the left and paste the values there. I get a runtime error that says the copy area and the paste area are not the same size. Here's what I'm currently working with:
Sub new_column()
Dim LC As Long
LC = Cells(1, Columns.Count).End(xlToLeft).Column
Columns(LC).Copy
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Cells(1, LC + 1).PasteSpecial Paste:=xlPasteValues
End Sub
As an added complication, the sheet in question is not a defined table and the header row is in the 10th row of the sheet; for testing purposes I simplified it by removing the boilerplate at the top, but the final version should use Excel row 10 to count the columns. If I'm understanding it correctly, it's counting through row 1 currently. Any help would be appreciated! Matt Deres (talk) 13:14, 22 April 2020 (UTC)[reply]

I think the problem is, you copy a whole column but you try and paste this whole column into the solitary cell (1, LC + 1). Beside that you shift some selection-cells without having selected any, so "selection" is some random range somewhere. And you paste in the next after the last column (LC+1), but after the shift this is the original column content. Intended is: copy LC to clipboard, shift LC to LC+1, paste clipboard into the now free room LC.
My suggestion inserts not a whole column but only the cells starting in row 10 in the last column, downwards through the last used row. The "10" in the range definitions is the starting row.
Sub new_column()
Dim LC As Long, LR As Long
LC = Cells(10, Columns.Count).End(xlToLeft).Column ' Last not empty cell in row 10
LR = Cells(Rows.Count, LC).End(xlUp).Row ' Last not empty cell in column LC
Range(cells(10, LC),cells(LR, LC)).Copy
Range(cells(10, LC),cells(LR, LC)).insert Shift:=xlToRight 'make room
Range(cells(10, LC),cells(LR, LC)).PasteSpecial Paste:=xlPasteValues 'insert only values
Application.CutCopyMode = False 'Free clipboard
End Sub
Greetings. 2003:F5:6F04:6400:6CD0:9822:C161:100F (talk) 10:00, 25 April 2020 (UTC) Marco PB[reply]
Thank you kindly - I'll give that a shot! Matt Deres (talk) 13:27, 28 April 2020 (UTC)[reply]