Hot answers tagged vba
This is just a sample approach. First name the destination sheets as follows: Then run this macro: Sub croupier() Dim N As Long, i As Long, s As String, M As Long Sheets("Sheet1").Select N = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To N v = Cells(i, 1).Value s = "s" & Len(v) With Sheets(s) M = ...
You don't specify a delimiter, so even your first bit of code fails. I've set the comma option to true to get the code to run. You may want to use a different delimiter. You can assign any range to MyRange, as long as it is suitable for the text to columns operation, i.e. one column only and data that suits the pattern you have set up, i.e. only two ...
If sh1.Range("A" & RowNum : "O" & RowNum).interior.color = rgb (127,187,199) is the actual line from your macro, you have a typo sh1.Range("A" & RowNum : "O" & RowNum) should be sh1.Range("A" & RowNum & ":" & "O" & RowNum) The colon : needs to be concatenated like everything else, since it's part of the range string
Nope, that's not possible. OneNote is not a "file format" that you can embed in another Office application. Embedding Word or Excel files into OneNote is possible because OneNote is great at managing the underlying XML that makes up Excel or Word files. A OneNote "file" is basically a folder on steroids, into which you can throw all kinds of things: ...
The usual way to implement this is with a third cell. Say we use C1 as the override: If C1 is empty, then use the value in A1.If C1 is not empty, then use it. So in B1 enter: =IF(C1="",A1,C1) and have the macro update C1.
Reading the HTMLBody property is considered a security risk, as malicious code could read your inbox. You might want to look at 3rd party products like Outlook Redemption. As you rightly determined, setting the property with a pre-constructed HTML string will avoid the need to read the HTMLBody property, and it will likely be more efficient too.
Only top voted, non community-wiki answers of a minimum length are eligible