Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2020, 08:40 PM
Guessed's Avatar
Guessed Guessed is offline Conflict between Dim, ReDim and Split Windows 10 Conflict between Dim, ReDim and Split Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You've got this post marked as solved - perhaps that is why you aren't getting answers.

As far as I know, you use Split to create a one dimensional array of substrings from a string by supplying the string and the character used to separate the substrings. Therefore your commands to dim and populate the array can only populate one row or column and might look like


Code:
Sub aTest()
  Dim ar() As String, vm As String
  vm = "a,b,c,d,e,f"
  ar = Split(vm, ",")
  Range(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(1, UBound(ar) + 1)).Value = ar
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conflict between Dim, ReDim and Split Mail Merge - split merged documents and rename each split document based on text in header FuriousD Word VBA 1 05-12-2019 04:06 AM
Split word file into several PDF using the bookmarks as split positions and name Fixxxer Word VBA 7 10-08-2018 01:10 AM
Split function in Excel (split the screen) Officer_Bierschnitt Excel 1 07-05-2017 07:02 AM
Folders in your mailbox have name conflict baclava Outlook 0 10-19-2016 08:50 AM
Template conflict b0x4it Word 0 05-21-2011 07:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft