How to return a result from a VBA function
How do I return a result from a function? For example: Public Function test() As Integer return 1 End Function This gives a compile error. How do I make this function return an integer? 4 Answers 4
How do I return a result from a function? For example: Public Function test() As Integer return 1 End Function This gives a compile error. How do I make this function return an integer? 4 Answers 4
There are many, many questions and quality answers on SO regarding how to prevent leading zeroes from getting stripped when importing to or exporting from Excel. However, I already have a spreadsheet that has values in it that were truncated as numbers when, in fact, they should have been handled as strings. I need to … Read more
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 7 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting … Read more
How can I construct the following string in an Excel formula: Maurice “The Rocket” Richard If I’m using single quotes, it’s trivial = “Maurice ‘The Rocket’ Richard” but what about double quotes? 13 Answers 13
MS Excel has the following observed MIME types: application/vnd.ms-excel (official) application/msexcel application/x-msexcel application/x-ms-excel application/x-excel application/x-dos_ms_excel application/xls application/x-xls application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx) Is there any one type that would work for all versions? If not, do we need to set response.setContentType() with each one of these mime types individually? Also, we use file streaming in our application to … Read more
This question already has answers here: What is a correct MIME type for .docx, .pptx, etc.? (9 answers) Closed 7 years ago. I want excel files on a website to open in Excel when clicked, not get saved on desktop, or get opened embedded in a browser etc. Now obviously it all depends on how … Read more
I’ve been asked to update some Excel 2003 macros, but the VBA projects are password protected, and it seems there’s a lack of documentation… no-one knows the passwords. Is there a way of removing or cracking the password on a VBA project? 24 s 24 You can try this direct VBA approach which doesn’t require … Read more
I’m developing a part of an application that’s responsible for exporting some data into CSV files. The application always uses UTF-8 because of its multilingual nature at all levels. But opening such CSV files (containing e.g. diacritics, cyrillic letters, Greek letters) in Excel does not achieve the expected results showing something like Г„/Г¤, Г–/Г¶. And … Read more
Does anyone happen to know if there is a token I can add to my csv for a certain field so Excel doesn’t try to convert it to a date? I’m trying to write a .csv file from my application and one of the values happens to look enough like a date that Excel is … Read more
I’ve heard much about the understandable abhorrence of using .Select in Excel VBA, but I am unsure of how to avoid using it. I am finding that my code would be more re-usable if I were able to use variables instead of Select functions. However, I am not sure how to refer to things (like … Read more