How to Fix Excel Crashing When Converting Stock Data to Linked Data Type via VBA
Question details
The user is experiencing complete Excel application crashes when running a VBA macro that uses the ConvertToLinkedDataType method to retrieve stock quotes, even though the same macro works perfectly on a different computer.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Executing a VBA macro designed to fetch stock quote information and convert the retrieved data into a Linked Data Type.
- Observed behavior
- Excel crashes unexpectedly during the VBA macro execution on one PC, despite functioning correctly on another machine with similar system resources.
Before making changes to your Office installation channels, save all open workbooks and note down the exact Office build and version numbers on both the working and crashing computers to identify any discrepancies.
Update Office Through the Current Channel
Updating your Office installation to the latest build in the Current Channel is the most effective way to resolve compatibility bugs related to linked data type services.
Because Microsoft frequently updates the backend services for Linked Data Types (like Stock data), an outdated or buggy Office build can cause VBA methods like ConvertToLinkedDataType to fail. Forcing an update via the command line ensures you have the latest patches.
Ensure that Microsoft Excel and all other Office applications are completely closed before proceeding.
Search for 'Command Prompt' or 'cmd' in the Windows Start menu, right-click the application, and select 'Run as administrator'.
Type the command `cd C:\Program Files\Common Files\Microsoft Shared\ClickToRun\` into the console and press Enter.
Execute the command `OfficeC2RClient.exe /changesetting Channel=Current` to switch your Office installation to the Current update channel.
Run `OfficeC2RClient.exe /update user` to prompt Office to check for, download, and install the latest updates. Once completed, restart your computer and test the macro again.

Switch to the Targeted Update Channel
If updating via the Current Channel does not resolve the crash, switching to the Targeted (Insider) Channel may provide a newer patch for the VBA data type conversion issue.
Try WPS Office for Stable Spreadsheet Management
If Microsoft Excel continues to crash due to build bugs and unpredictable update channels, consider switching to WPS Office. It provides a lightweight, highly compatible spreadsheet environment that seamlessly handles complex data without the heavy resource usage and frequent stability issues.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite installer.
- 2. Install and Launch: Run the installer, follow the on-screen prompts, and open WPS Spreadsheets.
- 3. Open Your Workbooks: Drag and drop your existing Excel workbooks into WPS to continue working with your data in a more stable environment.

Frequently Asked Questions
Why does ConvertToLinkedDataType crash Excel on only one computer?
This discrepancy typically occurs because the two computers are running different Office update channels or build versions. Microsoft's linked data type service relies heavily on backend updates, and a specific build on the crashing computer may contain a bug that causes the macro to fail.
How can I check my current Office update channel and build number?
Open Excel, click on 'File', and select 'Account' from the bottom left menu. Under the 'Product Information' section on the right, you will see your exact version number, build number, and the specific update channel (e.g., Current Channel or Semi-Annual Enterprise Channel) you are currently using.
Do I need to rewrite my VBA code to fix this Excel crash?
Likely not. If the exact same VBA macro runs perfectly on another machine with similar resources, the issue is almost certainly related to the Office installation build or the background linked data type service rather than a syntax or logic error in your code.




