copy-paste

Excel 2010 VBA: Runtime error 1004, Microsoft Excel cannot paste the data

…衆ロ難τιáo~ 提交于 2019-12-24 08:34:56
问题 I had been running a cut and paste picture routine for some time and all of a sudden Excel starting giving me this run time error. It had been working fine for several days until now (no OS update or reboot, though I did try closing and reopening Excel to see if it helped). Stranger still, the script does a batch copy and paste.picture, the same range (with recalculated values) is copied and pasted 13 times and the error message pops up usually in the last loop or occasionally at some random

Excel VBA Debug: Loop not searching through the whole range

拟墨画扇 提交于 2019-12-24 04:19:13
问题 I wrote a basic macro to search through a range (in one sheet) and then copy the selected cell (to another sheet) based on a 3rd sheet holding the selection values. I've used the loop as for i = x to y bu it looks like the macro is skipping some rows !???! i.e. If there are 4 valid values to be copied on rows 1 to 4, the macro only copies values from rows 2 and 4 (ditching the valid cells 1 and 3). Here's the code: Sub XXXXX() Dim i As Integer Dim PasteSheet As Worksheet: Set PasteSheet =

How can I paste arbitrary data into a TMemo?

守給你的承諾、 提交于 2019-12-24 03:24:11
问题 Copying and pasting text is easy enough, since it's built into TMemo, but it seems that it can only handle text. Seems to me that any kind of data can be represented as a string, though. If I copy some arbitrary data from another program and want to paste it into a TMemo, how do I get Delphi to accept it as a raw string? 回答1: "If I copy some arbitrary data from another program and want to paste it into a TMemo, how do I get Delphi to accept it as a raw string?" So to clarify your question,

Copy Command On ContextMenu over TextBlock inside DataGridTemplateColumn

主宰稳场 提交于 2019-12-24 02:44:21
问题 Thought of asking because never done this before on a TextBlock. I Am not able to copy the content of the DataGridTemplateColumn where it has a TextBlock in that and i have assigned a context menu to that. The copied content is blank. When I tried in MS word is Blank Cell. My Template Column and ContextMenu are as below. I Tried using TextBox But it work when the textbox is enabled and in-spite of grid column is readonly. It allows editing and when we disable it won't copy the text.

How do I copy a Shape from one Powerpoint presentation to another in VBA?

倖福魔咒の 提交于 2019-12-24 01:39:15
问题 I have VBA code to copy shapes matching a certain criteria from one Powerpoint presentation to another below. However, when it pastes the shape, it is offset (down and to the right) from the original position. How can I copy a shape while maintaining the original coordinates? sourceShape.Copy Presentations(2).Windows(1).Activate ActivePresentation.Slides(x).Shapes.Paste (1) 回答1: Perhaps simply: Shape s=ActivePresentation.Slides(x).Shapes.Paste (1) s.Left=sourceShape.Left s.Top=sourceShape.Top

0x202A in filename: Why?

萝らか妹 提交于 2019-12-24 00:58:36
问题 I recently needed to do a isnull in SQL on a varbinary image. So far so (ab)normal. I very quickly wrote a C# program to read in the file no_image.png from my desktop, and output the bytes as hex string. That program started like this: byte[] ba = System.IO.File.ReadAllBytes(@"‪D:\UserName\Desktop\no_image.png"); Console.WriteLine(ba.Length); // From here, change ba to hex string And as I had used readallbytes countless times before, I figured no big deal. To my surprise, I got a

Copying and Pasting between Workbooks VBA

99封情书 提交于 2019-12-23 06:42:45
问题 Please bear with me I am still learning VBA and could do with a little help. I am trying to copy data from one workbook to another even though there I have found many answers on this I am unable to Understand the code as its quite complicated. I was hoping if someone could help me with a basic code which is pretty easy to read and understand. I am currently looking to copy all data off 3 different workbooks and paste it into 1 workbook across 3 worksheets. For example I have 3 workbooks

Refereing to a range of cell in another sheet

ⅰ亾dé卋堺 提交于 2019-12-23 05:05:44
问题 I am currently trying to use a button to copy all the values inside a range to paste these values inside a range in a different sheet. Excel gives me an error with the second line of this code: Sub COPYVALUES() Range("Base_Copy!F15:Base_Copy!AK46").Select Selection.Copy Range("F15:AK46").Select ActiveSheet.Paste End Sub My two sheets are Base_Copy where the values are, an i want to paste the into Final_Copy 回答1: There are 3 different methods to reference different sheets. The below was stolen

How to use pastepecial to paste a chart as bitmap to another sheet in vba

混江龙づ霸主 提交于 2019-12-23 04:33:50
问题 Is there a way to use the pastspecial method to paste a copyied chart as a bitmap to another worksheet. Currently this is my syntax- PasteSheet.PasteSpecial (Format:="Bitmap", Link:=False, DisplayAsIcon:=False) Where PasteSheet is the other worksheet i want to paste to. Currently with this code, it is only pasting in the active sheet. Do i have to use select to copy then select the page i want to paste to, then change back to the sheet I copied from? I hope not as I have a lot of sheets haha.

Search for text in a string, copy & paste rows to new sheet

一世执手 提交于 2019-12-23 02:21:55
问题 I am new to VBA programming, and I need some help writing a simple macro in Excel 2010. I need to search for a text string in Column A (the exact text I'm searching for is not specified ) and if that string is found within the cell, cut and paste that cell's entire row into another sheet in the workbook and then delete the empty rows in the original sheet. I searched the forum a bit and found some code examples that almost got me where I wanted to get but not quite. 回答1: OK. I used the