I am converting my Excel 2000 VBA macros to run on the Mac using Office 2016 for the Mac and I want to end up with a macro that will run whatever platform it is on. With the help of Ron de Bruin’s excellent functions I am able to test on which platform the macro is running, have surmounted the problem of file separators and tested whether files exist before opening them but my macro falls down with ChDir. When a new workbook is made it does not necessarily save the file in the same directory as it’s host.
![]()
I do not want to hard code the directory path but be able to move my workbook with associated macro to any folder and let it make and save files there. The macro below sometimes works but often saves the file in an entirely different place using the path from a recently saved file. I cannot determine the logic but that is probably not important. Outlook for mac text navigation keyboard shortcuts ctrl-n. I need a Change Directory function that works. Perhaps this is a bug in 2016 Office for which I have to await a solution.
Thread: insert text box into chart excel for mac. Please select the base text for the phonetic guide macbook. 0 Thread(s) insert text box into chart excel for mac It's pretty amazing how bad the manual MS gives you to help you figure out how things work. If you put in text box chart, nothing comes up relating to those key words.
At the end of my test macro I have a solution but it is inelegant when all I want to do is load and save files from the host directory.
(The message boxes are there due to the lack of debugging tools in 2016 Office for Mac)
Sub Test()
Dim Path AsString
Path = ThisWorkbook.Path
Vba Excel For Mac Tutorial
ChDir Path No formatting text for mac.
Workbooks.Add
Range('A1').Select
ActiveCell.FormulaR1C1 = 'To Test Macro' 'Just to add some data to the blank workbook
MsgBox 'Path= ' + Path
ActiveWorkbook.SaveAs Filename:='Test2.xls'
Vba Code For Text Box
'The following of course saves in the correct place
F1File = Path + '/' + 'Test2.xls'
MsgBox F1File
![]() Format Text Vba Excel
ActiveWorkbook.SaveAs Filename:=F1File
Vba Excel For Mac
EndSub
Excel Macro Vba Textbox
regards
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |