vba

VBA Copy Paste Data into Excel from Project

泪湿孤枕 提交于 2021-02-09 08:47:54
问题 I'm running the code below and getting spurious results. For some reason it copies five lines of code into the desired worksheet instead of the specified MS Project data. Can Anyone help out a newbie? Five lines of code incorrectly copied into Excel worksheet: 'Open MS Project file projApp.Application.FileOpenEx "C:File.mpp" Set projApp = projApp.ActiveProject 'Final set up of code Set projApp = Nothing Sub OpenProjectCopyPasteData() Dim appProj As MSProject.Application Dim aProg As MSProject

VBA Copy Paste Data into Excel from Project

强颜欢笑 提交于 2021-02-09 08:46:47
问题 I'm running the code below and getting spurious results. For some reason it copies five lines of code into the desired worksheet instead of the specified MS Project data. Can Anyone help out a newbie? Five lines of code incorrectly copied into Excel worksheet: 'Open MS Project file projApp.Application.FileOpenEx "C:File.mpp" Set projApp = projApp.ActiveProject 'Final set up of code Set projApp = Nothing Sub OpenProjectCopyPasteData() Dim appProj As MSProject.Application Dim aProg As MSProject

Code Stopping While Looping through files on workbook.close

谁都会走 提交于 2021-02-09 07:04:34
问题 I am trying to loop through Excel files, open them, run some code that breaks passwords then closes the workbook and moves to the next. My code works on most of my files. I am having trouble with files that have macros in them. (That is the only thing I can see that differentiates these files from the others.) I have noticed that with the problem files when I open them my wb variable is set to nothing. It still opens the file and my code continues to run but when I execute the line wb.close

Detect the language in which Excel is setup and show it in a cell of the file

风格不统一 提交于 2021-02-09 00:21:30
问题 I'm designing a set of related excel file which are related between them. The objective is that the macros which refere to each other document, can work in any given computer/path. For this reason I have used a set of relative path which lets the macros work well. I have used the follwoing functions: =+CELDA("nombrearchivo";$A$1) "nombredearchivo" means "filename" in english. The problem here is that this function only works when the computer is setup in Spanish, but when the files are

Detect the language in which Excel is setup and show it in a cell of the file

百般思念 提交于 2021-02-09 00:19:50
问题 I'm designing a set of related excel file which are related between them. The objective is that the macros which refere to each other document, can work in any given computer/path. For this reason I have used a set of relative path which lets the macros work well. I have used the follwoing functions: =+CELDA("nombrearchivo";$A$1) "nombredearchivo" means "filename" in english. The problem here is that this function only works when the computer is setup in Spanish, but when the files are

Calling function in one MDB from another MDB

末鹿安然 提交于 2021-02-08 14:19:06
问题 We have developed a consolidation function that will be used by other processes and want to position the function in its own MDB (call it "remote") so that it can be referenced and called from "caller.mdb" when its needed. The function is designed to return an array and works great when executed called directly from within "remote." However, with "remote" properly referenced in the "caller" VBA project, when "caller" makes the call the function returns errors. We get a variety of errors such

VBA, inline array

為{幸葍}努か 提交于 2021-02-08 13:48:33
问题 Looking to create an inline array in Visual Basic for Applications Something like this would be cool: Dim a() as Integer set a = {1,2,3} In Java, this would be the equivalent functionality: int a[] = {1,2,3}; Also, bonus points if you can tell me how to find its length afterwards (without needing to hard code it, as all the examples my Googling have uncovered) (please don't tell me to Google it. I normally don't use vb, and I'm discovering that every result for a vb question on Google is

Convert PDF to Word Doc using excel VBA code

两盒软妹~` 提交于 2021-02-08 12:16:45
问题 everyone. Im need a VBA code to convert excel data to PDf to word doc, i wrote a macro that prints out excel as a pdf but now i would like to print it out as word from that pdf, so short version, Excel to PDF to Word. all this do to i wanna keep the format of the excel data 回答1: This will do what you want, but you need Adobe Acrobat installed. I don't know of any way to do this without having Acrobat installed. Option Explicit Option Private Module Sub ClearPaths() '--------------------------

Convert PDF to Word Doc using excel VBA code

只谈情不闲聊 提交于 2021-02-08 12:16:33
问题 everyone. Im need a VBA code to convert excel data to PDf to word doc, i wrote a macro that prints out excel as a pdf but now i would like to print it out as word from that pdf, so short version, Excel to PDF to Word. all this do to i wanna keep the format of the excel data 回答1: This will do what you want, but you need Adobe Acrobat installed. I don't know of any way to do this without having Acrobat installed. Option Explicit Option Private Module Sub ClearPaths() '--------------------------

VBA - IF a cell in column A = Value, then copy column B, C, D of same row to new worksheet

你离开我真会死。 提交于 2021-02-08 12:16:21
问题 I'm struggling to find any info that I can use on this. I searched heavily before coming here and any help would be greatly appreciated. I've got some basic VBA down, but this is a bit advanced to even know where to begin from scratch. If a cell in Column A = Value, then copy columns B, C, D of source worksheet to columns A, B, C of a new worksheet. Here's an example Source worksheet New worksheet Thanks! 回答1: You should ask the question more clearly so that we can help u. And every single